feat(api): add specialization catalog and candidate questionnaire contract
This commit is contained in:
1 parent
c338c0c188
commit
faeeb5f157
64 files changed
+8339
-47
No files matched your search
@@ -235,3 +235,193 @@ CandidateSession:
|
||||
onboarding_step: candidate_questionnaire
|
||||
created_at: "2026-10-05T09:30:00Z"
|
||||
csrf_token: Xk4pR9tV2mQ7wL1sN8bC5dF0gH3jZ6yA9eU2iO7rT4c
|
||||
SpecializationCatalog:
|
||||
summary: Illustrative MVP catalog with the Backend and Network Engineer banks published
|
||||
description: >-
|
||||
Illustrative values. The directions, specializations, and grades follow
|
||||
the MVP scale; `test_availability` comes from the published task banks,
|
||||
so the grades and languages shown here are not a statement about any
|
||||
deployed bank.
|
||||
value:
|
||||
directions:
|
||||
- code: development
|
||||
title: Разработка
|
||||
specializations:
|
||||
- code: backend
|
||||
title: Backend
|
||||
test_availability:
|
||||
status: available
|
||||
grades: [intern, junior, middle, senior]
|
||||
task_languages: [python, go]
|
||||
note: null
|
||||
- code: frontend
|
||||
title: Frontend
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: mobile
|
||||
title: Mobile
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: infrastructure
|
||||
title: Инфраструктура
|
||||
specializations:
|
||||
- code: network_engineer
|
||||
title: Сетевой инженер
|
||||
test_availability:
|
||||
status: available
|
||||
grades: [junior, middle]
|
||||
task_languages: []
|
||||
note: null
|
||||
- code: devops_sre
|
||||
title: DevOps/SRE
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: data
|
||||
title: Данные
|
||||
specializations:
|
||||
- code: data_analyst
|
||||
title: Аналитик данных
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: ds_ml
|
||||
title: DS/ML
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: security
|
||||
title: Безопасность
|
||||
specializations:
|
||||
- code: information_security
|
||||
title: Информационная безопасность
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: quality
|
||||
title: Качество
|
||||
specializations:
|
||||
- code: qa
|
||||
title: QA
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
grades:
|
||||
- code: intern
|
||||
title: Стажер
|
||||
- code: junior
|
||||
title: Junior
|
||||
- code: middle
|
||||
title: Middle
|
||||
- code: senior
|
||||
title: Senior
|
||||
NewCandidateQuestionnaire:
|
||||
summary: A candidate who has not saved the questionnaire yet
|
||||
value:
|
||||
version: 0
|
||||
specializations: []
|
||||
work_context: null
|
||||
updated_at: null
|
||||
BackendGoAndNetworkEngineerQuestionnaire:
|
||||
summary: Backend with Go and Network Engineer, two independent specializations
|
||||
description: >-
|
||||
Go is a task language of the `backend` specialization and PostgreSQL and
|
||||
gRPC are stack tags; none of them is a category. The candidate has two
|
||||
specializations, `backend` and `network_engineer`, each assessed
|
||||
independently. The self-assessed grades are claims; no confirmed grade
|
||||
appears.
|
||||
value:
|
||||
version: 3
|
||||
specializations:
|
||||
- specialization: backend
|
||||
self_assessed_grade: middle
|
||||
task_languages: [go]
|
||||
stack: [PostgreSQL, gRPC, Kafka]
|
||||
experience:
|
||||
commercial_months: 30
|
||||
academic_months: 12
|
||||
- specialization: network_engineer
|
||||
self_assessed_grade: junior
|
||||
task_languages: []
|
||||
stack: [Cisco IOS, BGP]
|
||||
experience: null
|
||||
work_context:
|
||||
work_formats: [remote, hybrid]
|
||||
updated_at: "2026-10-05T09:30:00Z"
|
||||
BackendGoAndNetworkEngineerQuestionnaireUpdate:
|
||||
summary: Save Backend with Go and Network Engineer over version 2
|
||||
value:
|
||||
expected_version: 2
|
||||
specializations:
|
||||
- specialization: backend
|
||||
self_assessed_grade: middle
|
||||
task_languages: [go]
|
||||
stack: [PostgreSQL, gRPC, Kafka]
|
||||
experience:
|
||||
commercial_months: 30
|
||||
academic_months: 12
|
||||
- specialization: network_engineer
|
||||
self_assessed_grade: junior
|
||||
task_languages: []
|
||||
stack: [Cisco IOS, BGP]
|
||||
experience: null
|
||||
work_context:
|
||||
work_formats: [remote, hybrid]
|
||||
QuestionnaireTooManySpecializations:
|
||||
summary: Three specializations were sent; at most two are allowed
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /specializations
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
QuestionnaireUnknownGrade:
|
||||
summary: A self-assessed grade outside the grade scale, such as lead
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 7d8e9f0a-1b2c-4d3e-9f4a-5b6c7d8e9f0a
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /specializations/0/self_assessed_grade
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
QuestionnaireRepeatedSpecialization:
|
||||
summary: The same specialization was chosen twice
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 8e9f0a1b-2c3d-4e4f-8a5b-6c7d8e9f0a1b
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /specializations/1/specialization
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
@@ -213,3 +213,51 @@ CsrfCheckFailed:
|
||||
examples:
|
||||
csrf_check_failed:
|
||||
$ref: ./examples.yml#/CsrfCheckFailed
|
||||
CsrfCheckFailedOrForbidden:
|
||||
description: >-
|
||||
The request failed cross-site request protection, code
|
||||
csrf_check_failed: the X-CSRF-Token header is missing or does not belong
|
||||
to the session, or the Origin is not allowed. Or the account may not
|
||||
perform the operation, code forbidden. Nothing was changed in either
|
||||
case.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
csrf_check_failed:
|
||||
$ref: ./examples.yml#/CsrfCheckFailed
|
||||
forbidden:
|
||||
$ref: ./examples.yml#/Forbidden
|
||||
QuestionnaireValidationFailed:
|
||||
description: >-
|
||||
The body does not match the contract or violates a questionnaire rule:
|
||||
more than two specializations, an unknown specialization, grade, or task
|
||||
language, an unknown field such as confirmed_grade, a repeated
|
||||
specialization, or a task language that the specialization's published
|
||||
bank does not offer; code validation_failed with body pointers. When the
|
||||
decoder does not record the path of a nested field, the pointer is the
|
||||
whole body. Nothing was changed.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
too_many_specializations:
|
||||
$ref: ./examples.yml#/QuestionnaireTooManySpecializations
|
||||
unknown_grade:
|
||||
$ref: ./examples.yml#/QuestionnaireUnknownGrade
|
||||
repeated_specialization:
|
||||
$ref: ./examples.yml#/QuestionnaireRepeatedSpecialization
|
||||
QuestionnaireVersionConflict:
|
||||
description: >-
|
||||
`expected_version` is not the current questionnaire version; code
|
||||
version_conflict. Nothing was changed; read the questionnaire again
|
||||
before retrying.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
version_conflict:
|
||||
$ref: ./examples.yml#/VersionConflict
|
||||
@@ -23,6 +23,195 @@ PageInfo:
|
||||
maxLength: 512
|
||||
pattern: ^[A-Za-z0-9_-]+$
|
||||
description: Opaque cursor of the next page, or null on the last page. Clients must not parse, build, or store it beyond the current listing.
|
||||
DirectionCode:
|
||||
type: string
|
||||
description: 'Stable code of a professional direction, the group that a specialization belongs to.
|
||||
|
||||
|
||||
- development: Development.
|
||||
|
||||
- infrastructure: Infrastructure.
|
||||
|
||||
- data: Data.
|
||||
|
||||
- security: Security.
|
||||
|
||||
- quality: Quality.
|
||||
|
||||
|
||||
Adding a value is a contract change.'
|
||||
enum:
|
||||
- development
|
||||
- infrastructure
|
||||
- data
|
||||
- security
|
||||
- quality
|
||||
SpecializationCode:
|
||||
type: string
|
||||
description: 'Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.
|
||||
|
||||
|
||||
- backend: Backend (development).
|
||||
|
||||
- frontend: Frontend (development).
|
||||
|
||||
- mobile: Mobile (development).
|
||||
|
||||
- network_engineer: Network Engineer (infrastructure).
|
||||
|
||||
- devops_sre: DevOps/SRE (infrastructure).
|
||||
|
||||
- data_analyst: Data Analyst (data).
|
||||
|
||||
- ds_ml: DS/ML (data).
|
||||
|
||||
- information_security: Information security (security).
|
||||
|
||||
- qa: QA (quality).
|
||||
|
||||
|
||||
Adding a value is a contract change; renaming or removing one is a breaking change.'
|
||||
enum:
|
||||
- backend
|
||||
- frontend
|
||||
- mobile
|
||||
- network_engineer
|
||||
- devops_sre
|
||||
- data_analyst
|
||||
- ds_ml
|
||||
- information_security
|
||||
- qa
|
||||
GradeCode:
|
||||
type: string
|
||||
description: 'Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'
|
||||
enum:
|
||||
- intern
|
||||
- junior
|
||||
- middle
|
||||
- senior
|
||||
TaskLanguage:
|
||||
type: string
|
||||
description: Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate's platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.
|
||||
enum:
|
||||
- python
|
||||
- go
|
||||
TestAvailabilityStatus:
|
||||
type: string
|
||||
description: Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.
|
||||
enum:
|
||||
- available
|
||||
- in_development
|
||||
TestAvailability:
|
||||
type: object
|
||||
description: Assessment availability of a specialization, derived by the server from the published task banks at the time of the request. The MVP opens an assessment only for a category, a specialization and a grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for `in_development` both `grades` and `task_languages` are empty.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- grades
|
||||
- task_languages
|
||||
- note
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/TestAvailabilityStatus'
|
||||
grades:
|
||||
type: array
|
||||
maxItems: 10
|
||||
uniqueItems: true
|
||||
description: Grades of the specialization with a published task bank, in ascending order. Only these categories can be assessed and confirmed.
|
||||
items:
|
||||
$ref: '#/GradeCode'
|
||||
task_languages:
|
||||
type: array
|
||||
maxItems: 2
|
||||
uniqueItems: true
|
||||
description: Task languages that the published bank offers for this specialization. Empty when the bank does not offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire accepts only these languages for the specialization.
|
||||
items:
|
||||
$ref: '#/TaskLanguage'
|
||||
note:
|
||||
type:
|
||||
- string
|
||||
- 'null'
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
description: Short Russian note for the candidate, for example why the test is not available yet, or null. Plain text; the client shows it as text, never as HTML.
|
||||
CatalogSpecialization:
|
||||
type: object
|
||||
description: Specialization in the catalog with its assessment availability.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
- test_availability
|
||||
properties:
|
||||
code:
|
||||
$ref: '#/SpecializationCode'
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
test_availability:
|
||||
$ref: '#/TestAvailability'
|
||||
CatalogDirection:
|
||||
type: object
|
||||
description: Professional direction with its specializations. Each specialization belongs to exactly one direction.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
- specializations
|
||||
properties:
|
||||
code:
|
||||
$ref: '#/DirectionCode'
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
specializations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Specializations of the direction in display order.
|
||||
items:
|
||||
$ref: '#/CatalogSpecialization'
|
||||
CatalogGrade:
|
||||
type: object
|
||||
description: Grade of the scale with its display name.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
properties:
|
||||
code:
|
||||
$ref: '#/GradeCode'
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
SpecializationCatalog:
|
||||
type: object
|
||||
description: Catalog of directions, specializations, and the grade scale that the questionnaire and the assessment use. The catalog is reference data and identical for every caller; it contains no personal data.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- directions
|
||||
- grades
|
||||
properties:
|
||||
directions:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Directions in display order.
|
||||
items:
|
||||
$ref: '#/CatalogDirection'
|
||||
grades:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 10
|
||||
description: Grade scale in ascending order.
|
||||
items:
|
||||
$ref: '#/CatalogGrade'
|
||||
HealthResponse:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@@ -68,7 +257,7 @@ OnboardingStep:
|
||||
|
||||
- candidate_questionnaire: candidate questionnaire.
|
||||
|
||||
- candidate_assessment: choice of the expected grade and the assessment.
|
||||
- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).
|
||||
|
||||
- employer_company: company profile of the employer.
|
||||
|
||||
@@ -338,7 +527,7 @@ ProblemCode:
|
||||
|
||||
- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.
|
||||
|
||||
- version_conflict (412): If-Match does not match the current version.
|
||||
- version_conflict (412): If-Match, or an `expected_version` field in the request body, does not match the current version; nothing was changed.
|
||||
|
||||
- payload_too_large (413): the request body exceeds the limit.
|
||||
|
||||
@@ -411,3 +600,140 @@ ProblemFieldLocation:
|
||||
- path
|
||||
- header
|
||||
- cookie
|
||||
QuestionnaireVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
description: Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.
|
||||
examples:
|
||||
- 3
|
||||
StackTag:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 50
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: 'Free technology tag of the candidate''s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.'
|
||||
WorkFormat:
|
||||
type: string
|
||||
description: 'Acceptable work format: `remote`, `office`, or `hybrid`.'
|
||||
enum:
|
||||
- remote
|
||||
- office
|
||||
- hybrid
|
||||
WorkContext:
|
||||
type: object
|
||||
description: Working context of the candidate's search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- work_formats
|
||||
properties:
|
||||
work_formats:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
description: Acceptable work formats.
|
||||
items:
|
||||
$ref: '#/WorkFormat'
|
||||
CandidateExperience:
|
||||
type: object
|
||||
description: 'Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- commercial_months
|
||||
- academic_months
|
||||
properties:
|
||||
commercial_months:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 600
|
||||
description: Months of commercial work in the specialization.
|
||||
academic_months:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 600
|
||||
description: Months of study, internships, or academic projects in the specialization.
|
||||
QuestionnaireSpecialization:
|
||||
type: object
|
||||
description: 'One specialization chosen by the candidate with the candidate''s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- self_assessed_grade
|
||||
- task_languages
|
||||
- stack
|
||||
- experience
|
||||
properties:
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
self_assessed_grade:
|
||||
$ref: '#/GradeCode'
|
||||
task_languages:
|
||||
type: array
|
||||
maxItems: 2
|
||||
uniqueItems: true
|
||||
description: Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.
|
||||
items:
|
||||
$ref: '#/TaskLanguage'
|
||||
stack:
|
||||
type: array
|
||||
maxItems: 20
|
||||
uniqueItems: true
|
||||
description: Technology tags of the candidate in this specialization.
|
||||
items:
|
||||
$ref: '#/StackTag'
|
||||
experience:
|
||||
description: Stated experience, or null when the candidate did not state it.
|
||||
oneOf:
|
||||
- $ref: '#/CandidateExperience'
|
||||
- type: 'null'
|
||||
CandidateQuestionnaire:
|
||||
type: object
|
||||
description: 'Questionnaire of the current candidate: the chosen specializations with self-assessed grades and the working context. It never contains a confirmed grade or a category; those come only from assessment results. A candidate who has not saved the questionnaire yet gets version 0, no specializations, and null `work_context` and `updated_at`.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- version
|
||||
- specializations
|
||||
- work_context
|
||||
- updated_at
|
||||
properties:
|
||||
version:
|
||||
$ref: '#/QuestionnaireVersion'
|
||||
specializations:
|
||||
type: array
|
||||
maxItems: 2
|
||||
description: Chosen specializations in the order the candidate gave them, each specialization at most once. Each one is assessed independently.
|
||||
items:
|
||||
$ref: '#/QuestionnaireSpecialization'
|
||||
work_context:
|
||||
description: Working context, or null before the first save.
|
||||
oneOf:
|
||||
- $ref: '#/WorkContext'
|
||||
- type: 'null'
|
||||
updated_at:
|
||||
description: Time of the last change, or null before the first save.
|
||||
oneOf:
|
||||
- $ref: '#/Timestamp'
|
||||
- type: 'null'
|
||||
CandidateQuestionnaireUpdate:
|
||||
type: object
|
||||
description: Complete new state of the questionnaire. It replaces the stored specializations and working context as a whole. Unknown fields are rejected, so a request cannot set a confirmed grade or a category.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
- specializations
|
||||
- work_context
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: '#/QuestionnaireVersion'
|
||||
specializations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
description: One or two chosen specializations. The schema limits the count; the server also requires each specialization to appear at most once and answers a repeated one with 400 validation_failed and the pointer of the repeated item's `specialization`, for example `/specializations/1/specialization`.
|
||||
items:
|
||||
$ref: '#/QuestionnaireSpecialization'
|
||||
work_context:
|
||||
$ref: '#/WorkContext'
|
||||
@@ -0,0 +1,212 @@
|
||||
schemas:
|
||||
DirectionCode:
|
||||
type: string
|
||||
description: |-
|
||||
Stable code of a professional direction, the group that a specialization belongs to.
|
||||
|
||||
- development: Development.
|
||||
- infrastructure: Infrastructure.
|
||||
- data: Data.
|
||||
- security: Security.
|
||||
- quality: Quality.
|
||||
|
||||
Adding a value is a contract change.
|
||||
enum:
|
||||
- development
|
||||
- infrastructure
|
||||
- data
|
||||
- security
|
||||
- quality
|
||||
SpecializationCode:
|
||||
type: string
|
||||
description: |-
|
||||
Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.
|
||||
|
||||
- backend: Backend (development).
|
||||
- frontend: Frontend (development).
|
||||
- mobile: Mobile (development).
|
||||
- network_engineer: Network Engineer (infrastructure).
|
||||
- devops_sre: DevOps/SRE (infrastructure).
|
||||
- data_analyst: Data Analyst (data).
|
||||
- ds_ml: DS/ML (data).
|
||||
- information_security: Information security (security).
|
||||
- qa: QA (quality).
|
||||
|
||||
Adding a value is a contract change; renaming or removing one is a breaking change.
|
||||
enum:
|
||||
- backend
|
||||
- frontend
|
||||
- mobile
|
||||
- network_engineer
|
||||
- devops_sre
|
||||
- data_analyst
|
||||
- ds_ml
|
||||
- information_security
|
||||
- qa
|
||||
GradeCode:
|
||||
type: string
|
||||
description: |-
|
||||
Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.
|
||||
enum:
|
||||
- intern
|
||||
- junior
|
||||
- middle
|
||||
- senior
|
||||
TaskLanguage:
|
||||
type: string
|
||||
description: >-
|
||||
Programming language in which assessment tasks of a specialization are
|
||||
offered and solved. It is the language of the task bank, not the
|
||||
candidate's platform stack, and it never forms a separate category.
|
||||
Only banks that offer a choice of language define task languages; the
|
||||
first Backend bank offers Python and Go. Adding a value is a contract
|
||||
change.
|
||||
enum:
|
||||
- python
|
||||
- go
|
||||
TestAvailabilityStatus:
|
||||
type: string
|
||||
description: >-
|
||||
Whether an assessment can start for the specialization. `available`
|
||||
means that a published task bank exists for at least one grade, listed
|
||||
in `TestAvailability.grades`. `in_development` means that no grade of
|
||||
the specialization has a published bank yet; the specialization can
|
||||
still be chosen in the questionnaire, but no assessment starts and no
|
||||
category can be confirmed for it. Presence in the catalog or in demo
|
||||
data never means that a test is ready.
|
||||
enum:
|
||||
- available
|
||||
- in_development
|
||||
TestAvailability:
|
||||
type: object
|
||||
description: >-
|
||||
Assessment availability of a specialization, derived by the server from
|
||||
the published task banks at the time of the request. The MVP opens an
|
||||
assessment only for a category, a specialization and a grade, that has
|
||||
a published bank. `status` is `available` exactly when `grades` is not
|
||||
empty; for `in_development` both `grades` and `task_languages` are
|
||||
empty.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- grades
|
||||
- task_languages
|
||||
- note
|
||||
properties:
|
||||
status:
|
||||
$ref: "#/schemas/TestAvailabilityStatus"
|
||||
grades:
|
||||
type: array
|
||||
maxItems: 10
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Grades of the specialization with a published task bank, in
|
||||
ascending order. Only these categories can be assessed and
|
||||
confirmed.
|
||||
items:
|
||||
$ref: "#/schemas/GradeCode"
|
||||
task_languages:
|
||||
type: array
|
||||
maxItems: 2
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Task languages that the published bank offers for this
|
||||
specialization. Empty when the bank does not offer a choice of
|
||||
language, as for Network Engineer, or when no bank is published.
|
||||
The questionnaire accepts only these languages for the
|
||||
specialization.
|
||||
items:
|
||||
$ref: "#/schemas/TaskLanguage"
|
||||
note:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
description: >-
|
||||
Short Russian note for the candidate, for example why the test is
|
||||
not available yet, or null. Plain text; the client shows it as
|
||||
text, never as HTML.
|
||||
CatalogSpecialization:
|
||||
type: object
|
||||
description: Specialization in the catalog with its assessment availability.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
- test_availability
|
||||
properties:
|
||||
code:
|
||||
$ref: "#/schemas/SpecializationCode"
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
test_availability:
|
||||
$ref: "#/schemas/TestAvailability"
|
||||
CatalogDirection:
|
||||
type: object
|
||||
description: >-
|
||||
Professional direction with its specializations. Each specialization
|
||||
belongs to exactly one direction.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
- specializations
|
||||
properties:
|
||||
code:
|
||||
$ref: "#/schemas/DirectionCode"
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
specializations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Specializations of the direction in display order.
|
||||
items:
|
||||
$ref: "#/schemas/CatalogSpecialization"
|
||||
CatalogGrade:
|
||||
type: object
|
||||
description: Grade of the scale with its display name.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
properties:
|
||||
code:
|
||||
$ref: "#/schemas/GradeCode"
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
SpecializationCatalog:
|
||||
type: object
|
||||
description: >-
|
||||
Catalog of directions, specializations, and the grade scale that the
|
||||
questionnaire and the assessment use. The catalog is reference data and
|
||||
identical for every caller; it contains no personal data.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- directions
|
||||
- grades
|
||||
properties:
|
||||
directions:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Directions in display order.
|
||||
items:
|
||||
$ref: "#/schemas/CatalogDirection"
|
||||
grades:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 10
|
||||
description: Grade scale in ascending order.
|
||||
items:
|
||||
$ref: "#/schemas/CatalogGrade"
|
||||
@@ -56,7 +56,7 @@ schemas:
|
||||
- candidate_consents: candidate consents beyond C1, which was given at registration.
|
||||
- candidate_profile: candidate profile.
|
||||
- candidate_questionnaire: candidate questionnaire.
|
||||
- candidate_assessment: choice of the expected grade and the assessment.
|
||||
- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).
|
||||
- employer_company: company profile of the employer.
|
||||
- completed: onboarding is finished; the client opens the scenario home.
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ schemas:
|
||||
- method_not_allowed (405): the route does not support the method.
|
||||
- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.
|
||||
- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.
|
||||
- version_conflict (412): If-Match does not match the current version.
|
||||
- version_conflict (412): If-Match, or an `expected_version` field in the request body, does not match the current version; nothing was changed.
|
||||
- payload_too_large (413): the request body exceeds the limit.
|
||||
- unsupported_media_type (415): the request Content-Type is not accepted.
|
||||
- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
schemas:
|
||||
QuestionnaireVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
description: >-
|
||||
Version of the candidate questionnaire. A candidate without a saved
|
||||
questionnaire has version 0; every save that changes the questionnaire
|
||||
advances it by one.
|
||||
examples:
|
||||
- 3
|
||||
StackTag:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 50
|
||||
pattern: '^\S(?:.*\S)?$'
|
||||
description: >-
|
||||
Free technology tag of the candidate's stack, for example PostgreSQL,
|
||||
Kubernetes, or Django. A tag is a descriptive attribute: it never
|
||||
forms a category, never selects the task language, and never changes
|
||||
a grade, so a tag such as "Senior" has no effect on any category. It
|
||||
has no leading or trailing whitespace and no line breaks. The server
|
||||
compares tags without regard to letter case. Clients show tags as
|
||||
text, never as HTML.
|
||||
WorkFormat:
|
||||
type: string
|
||||
description: "Acceptable work format: `remote`, `office`, or `hybrid`."
|
||||
enum:
|
||||
- remote
|
||||
- office
|
||||
- hybrid
|
||||
WorkContext:
|
||||
type: object
|
||||
description: >-
|
||||
Working context of the candidate's search. It holds no personal data
|
||||
such as an address or a city; location, relocation, and salary
|
||||
expectations belong to the candidate profile.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- work_formats
|
||||
properties:
|
||||
work_formats:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
description: Acceptable work formats.
|
||||
items:
|
||||
$ref: "#/schemas/WorkFormat"
|
||||
CandidateExperience:
|
||||
type: object
|
||||
description: >-
|
||||
Experience that the candidate states for one specialization, in whole
|
||||
months. It is self-reported context: it never adds assessment points
|
||||
and never confirms a grade.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- commercial_months
|
||||
- academic_months
|
||||
properties:
|
||||
commercial_months:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 600
|
||||
description: Months of commercial work in the specialization.
|
||||
academic_months:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 600
|
||||
description: >-
|
||||
Months of study, internships, or academic projects in the
|
||||
specialization.
|
||||
QuestionnaireSpecialization:
|
||||
type: object
|
||||
description: >-
|
||||
One specialization chosen by the candidate with the candidate's
|
||||
self-assessment. `self_assessed_grade` is a claim: it influences where
|
||||
the assessment starts and which grade the assessment step offers
|
||||
first, but it adds no points and never becomes a confirmed grade. A
|
||||
confirmed grade, and with it a category, comes only from an assessment
|
||||
result and is never part of the questionnaire; unknown fields such as
|
||||
`confirmed_grade` or `category` are rejected. Task languages and the
|
||||
stack are attributes of the chosen specialization, not categories.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- self_assessed_grade
|
||||
- task_languages
|
||||
- stack
|
||||
- experience
|
||||
properties:
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
self_assessed_grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
task_languages:
|
||||
type: array
|
||||
maxItems: 2
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Task languages in which the candidate wants to solve assessment
|
||||
tasks of this specialization. Each value must be one of
|
||||
`test_availability.task_languages` of the specialization in the
|
||||
current catalog; any other value answers 400 validation_failed
|
||||
with a pointer to it. Empty when the bank offers no choice of
|
||||
language.
|
||||
items:
|
||||
$ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
|
||||
stack:
|
||||
type: array
|
||||
maxItems: 20
|
||||
uniqueItems: true
|
||||
description: Technology tags of the candidate in this specialization.
|
||||
items:
|
||||
$ref: "#/schemas/StackTag"
|
||||
experience:
|
||||
description: >-
|
||||
Stated experience, or null when the candidate did not state it.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/CandidateExperience"
|
||||
- type: "null"
|
||||
CandidateQuestionnaire:
|
||||
type: object
|
||||
description: >-
|
||||
Questionnaire of the current candidate: the chosen specializations with
|
||||
self-assessed grades and the working context. It never contains a
|
||||
confirmed grade or a category; those come only from assessment
|
||||
results. A candidate who has not saved the questionnaire yet gets
|
||||
version 0, no specializations, and null `work_context` and
|
||||
`updated_at`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- version
|
||||
- specializations
|
||||
- work_context
|
||||
- updated_at
|
||||
properties:
|
||||
version:
|
||||
$ref: "#/schemas/QuestionnaireVersion"
|
||||
specializations:
|
||||
type: array
|
||||
maxItems: 2
|
||||
description: >-
|
||||
Chosen specializations in the order the candidate gave them, each
|
||||
specialization at most once. Each one is assessed independently.
|
||||
items:
|
||||
$ref: "#/schemas/QuestionnaireSpecialization"
|
||||
work_context:
|
||||
description: Working context, or null before the first save.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/WorkContext"
|
||||
- type: "null"
|
||||
updated_at:
|
||||
description: Time of the last change, or null before the first save.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
CandidateQuestionnaireUpdate:
|
||||
type: object
|
||||
description: >-
|
||||
Complete new state of the questionnaire. It replaces the stored
|
||||
specializations and working context as a whole. Unknown fields are
|
||||
rejected, so a request cannot set a confirmed grade or a category.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
- specializations
|
||||
- work_context
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/QuestionnaireVersion"
|
||||
specializations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
description: >-
|
||||
One or two chosen specializations. The schema limits the count; the
|
||||
server also requires each specialization to appear at most once and
|
||||
answers a repeated one with 400 validation_failed and the pointer
|
||||
of the repeated item's `specialization`, for example
|
||||
`/specializations/1/specialization`.
|
||||
items:
|
||||
$ref: "#/schemas/QuestionnaireSpecialization"
|
||||
work_context:
|
||||
$ref: "#/schemas/WorkContext"
|
||||
+674
-10
@@ -11,6 +11,10 @@ tags:
|
||||
description: Liveness of the API process.
|
||||
- name: identity
|
||||
description: Registration, email verification, login, logout, and the current account. Sessions are server-side and travel in an HttpOnly cookie; mutating requests that require a session also carry a CSRF token.
|
||||
- name: catalog
|
||||
description: 'Public reference data: directions, specializations with their assessment availability, and the grade scale.'
|
||||
- name: candidate
|
||||
description: Data of the current candidate, such as the questionnaire with the chosen specializations and self-assessed grades. Confirmed grades and categories come only from assessment results.
|
||||
paths:
|
||||
/api/v1/healthz:
|
||||
get:
|
||||
@@ -369,6 +373,116 @@ paths:
|
||||
$ref: '#/components/responses/Unauthenticated'
|
||||
default:
|
||||
$ref: '#/components/responses/Problem'
|
||||
/api/v1/specializations:
|
||||
get:
|
||||
operationId: GetSpecializationCatalog
|
||||
summary: Read the catalog of directions, specializations, and grades.
|
||||
description: |-
|
||||
Public operation without a session. Returns the directions with their specializations, the assessment availability of each specialization, and the grade scale. The candidate picks specializations and self-assessed grades from this catalog for the questionnaire, and the client joins the codes stored in the questionnaire with the titles here.
|
||||
|
||||
The catalog is public because it is the same for every caller and contains no personal data: the product shows it before registration, and a public read lets intermediaries and the browser cache it. It reveals nothing beyond what the landing pages already show.
|
||||
|
||||
A category is a specialization together with a confirmed grade. Task languages and the stack are attributes of a chosen specialization and never appear as categories. `test_availability` is derived from the published task banks at the time of the request, so it changes when a bank is published, without a contract change: the MVP opens an assessment only for a category with a published bank, and every other specialization is marked `in_development`. Presence in the catalog never means that its test is ready.
|
||||
security: []
|
||||
tags:
|
||||
- catalog
|
||||
responses:
|
||||
'200':
|
||||
description: The catalog.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SpecializationCatalog'
|
||||
examples:
|
||||
mvp:
|
||||
$ref: '#/components/examples/SpecializationCatalog'
|
||||
default:
|
||||
$ref: '#/components/responses/Problem'
|
||||
/api/v1/me/questionnaire:
|
||||
get:
|
||||
operationId: GetMyQuestionnaire
|
||||
summary: Read the questionnaire of the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. A candidate who has not saved the questionnaire yet gets 200 with version 0 and no specializations rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing questionnaire is not an error state.
|
||||
|
||||
The response never contains a confirmed grade or a category; those come only from assessment results. A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- candidate
|
||||
responses:
|
||||
'200':
|
||||
description: The questionnaire of the current candidate.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: '#/components/headers/CacheControlNoStore'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CandidateQuestionnaire'
|
||||
examples:
|
||||
new_candidate:
|
||||
$ref: '#/components/examples/NewCandidateQuestionnaire'
|
||||
backend_go_and_network_engineer:
|
||||
$ref: '#/components/examples/BackendGoAndNetworkEngineerQuestionnaire'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthenticated'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
default:
|
||||
$ref: '#/components/responses/Problem'
|
||||
put:
|
||||
operationId: SaveMyQuestionnaire
|
||||
summary: Replace the questionnaire of the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new state: one or two specializations, each with a self-assessed grade, task languages, stack tags, and stated experience or null, and the working context. It replaces the stored questionnaire as a whole.
|
||||
|
||||
Self-assessment is a claim. It influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never writes a confirmed grade or a category: a self-assessed `senior`, or the word "Senior" in a stack tag, never assigns the Senior category. A real profile stays invisible to employers until an assessment confirms a category. Choosing a specialization whose test is `in_development` is allowed; no assessment starts for it until its bank is published. Removing a specialization from the questionnaire does not change assessment results.
|
||||
|
||||
Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first save. If it is not the current version, the server answers 412 version_conflict and changes nothing; the client reads the questionnaire again. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet. The status and code are the same as for a failed If-Match, since the client action is the same.
|
||||
|
||||
The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose specializations and working context equal the stored ones changes nothing, keeps the version, and answers 200 with the current questionnaire even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), domain rules (400), then the version (412). The schema rejects more than two specializations, an unknown grade, specialization, or task language, and unknown fields. The server also rejects a repeated specialization and a task language that the specialization's published bank does not offer, with 400 validation_failed and pointers to the items, for example `/specializations/1/specialization` or `/specializations/0/task_languages/0`.
|
||||
|
||||
A successful save on the onboarding step candidate_questionnaire advances the account to candidate_assessment (planned).
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- candidate
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CandidateQuestionnaireUpdate'
|
||||
examples:
|
||||
backend_go_and_network_engineer:
|
||||
$ref: '#/components/examples/BackendGoAndNetworkEngineerQuestionnaireUpdate'
|
||||
responses:
|
||||
'200':
|
||||
description: The saved questionnaire with its new version.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: '#/components/headers/CacheControlNoStore'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CandidateQuestionnaire'
|
||||
examples:
|
||||
backend_go_and_network_engineer:
|
||||
$ref: '#/components/examples/BackendGoAndNetworkEngineerQuestionnaire'
|
||||
'400':
|
||||
$ref: '#/components/responses/QuestionnaireValidationFailed'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthenticated'
|
||||
'403':
|
||||
$ref: '#/components/responses/CsrfCheckFailedOrForbidden'
|
||||
'412':
|
||||
$ref: '#/components/responses/QuestionnaireVersionConflict'
|
||||
default:
|
||||
$ref: '#/components/responses/Problem'
|
||||
components:
|
||||
schemas:
|
||||
Problem:
|
||||
@@ -437,7 +551,7 @@ components:
|
||||
- method_not_allowed (405): the route does not support the method.
|
||||
- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.
|
||||
- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.
|
||||
- version_conflict (412): If-Match does not match the current version.
|
||||
- version_conflict (412): If-Match, or an `expected_version` field in the request body, does not match the current version; nothing was changed.
|
||||
- payload_too_large (413): the request body exceeds the limit.
|
||||
- unsupported_media_type (415): the request Content-Type is not accepted.
|
||||
- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.
|
||||
@@ -560,7 +674,7 @@ components:
|
||||
- candidate_consents: candidate consents beyond C1, which was given at registration.
|
||||
- candidate_profile: candidate profile.
|
||||
- candidate_questionnaire: candidate questionnaire.
|
||||
- candidate_assessment: choice of the expected grade and the assessment.
|
||||
- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).
|
||||
- employer_company: company profile of the employer.
|
||||
- completed: onboarding is finished; the client opens the scenario home.
|
||||
|
||||
@@ -749,6 +863,318 @@ components:
|
||||
$ref: '#/components/schemas/Account'
|
||||
csrf_token:
|
||||
$ref: '#/components/schemas/CsrfToken'
|
||||
DirectionCode:
|
||||
type: string
|
||||
description: |-
|
||||
Stable code of a professional direction, the group that a specialization belongs to.
|
||||
|
||||
- development: Development.
|
||||
- infrastructure: Infrastructure.
|
||||
- data: Data.
|
||||
- security: Security.
|
||||
- quality: Quality.
|
||||
|
||||
Adding a value is a contract change.
|
||||
enum:
|
||||
- development
|
||||
- infrastructure
|
||||
- data
|
||||
- security
|
||||
- quality
|
||||
SpecializationCode:
|
||||
type: string
|
||||
description: |-
|
||||
Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.
|
||||
|
||||
- backend: Backend (development).
|
||||
- frontend: Frontend (development).
|
||||
- mobile: Mobile (development).
|
||||
- network_engineer: Network Engineer (infrastructure).
|
||||
- devops_sre: DevOps/SRE (infrastructure).
|
||||
- data_analyst: Data Analyst (data).
|
||||
- ds_ml: DS/ML (data).
|
||||
- information_security: Information security (security).
|
||||
- qa: QA (quality).
|
||||
|
||||
Adding a value is a contract change; renaming or removing one is a breaking change.
|
||||
enum:
|
||||
- backend
|
||||
- frontend
|
||||
- mobile
|
||||
- network_engineer
|
||||
- devops_sre
|
||||
- data_analyst
|
||||
- ds_ml
|
||||
- information_security
|
||||
- qa
|
||||
GradeCode:
|
||||
type: string
|
||||
description: 'Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'
|
||||
enum:
|
||||
- intern
|
||||
- junior
|
||||
- middle
|
||||
- senior
|
||||
TaskLanguage:
|
||||
type: string
|
||||
description: Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate's platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.
|
||||
enum:
|
||||
- python
|
||||
- go
|
||||
TestAvailabilityStatus:
|
||||
type: string
|
||||
description: Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.
|
||||
enum:
|
||||
- available
|
||||
- in_development
|
||||
TestAvailability:
|
||||
type: object
|
||||
description: Assessment availability of a specialization, derived by the server from the published task banks at the time of the request. The MVP opens an assessment only for a category, a specialization and a grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for `in_development` both `grades` and `task_languages` are empty.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- grades
|
||||
- task_languages
|
||||
- note
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/components/schemas/TestAvailabilityStatus'
|
||||
grades:
|
||||
type: array
|
||||
maxItems: 10
|
||||
uniqueItems: true
|
||||
description: Grades of the specialization with a published task bank, in ascending order. Only these categories can be assessed and confirmed.
|
||||
items:
|
||||
$ref: '#/components/schemas/GradeCode'
|
||||
task_languages:
|
||||
type: array
|
||||
maxItems: 2
|
||||
uniqueItems: true
|
||||
description: Task languages that the published bank offers for this specialization. Empty when the bank does not offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire accepts only these languages for the specialization.
|
||||
items:
|
||||
$ref: '#/components/schemas/TaskLanguage'
|
||||
note:
|
||||
type:
|
||||
- string
|
||||
- 'null'
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
description: Short Russian note for the candidate, for example why the test is not available yet, or null. Plain text; the client shows it as text, never as HTML.
|
||||
CatalogSpecialization:
|
||||
type: object
|
||||
description: Specialization in the catalog with its assessment availability.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
- test_availability
|
||||
properties:
|
||||
code:
|
||||
$ref: '#/components/schemas/SpecializationCode'
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
test_availability:
|
||||
$ref: '#/components/schemas/TestAvailability'
|
||||
CatalogDirection:
|
||||
type: object
|
||||
description: Professional direction with its specializations. Each specialization belongs to exactly one direction.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
- specializations
|
||||
properties:
|
||||
code:
|
||||
$ref: '#/components/schemas/DirectionCode'
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
specializations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Specializations of the direction in display order.
|
||||
items:
|
||||
$ref: '#/components/schemas/CatalogSpecialization'
|
||||
CatalogGrade:
|
||||
type: object
|
||||
description: Grade of the scale with its display name.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- title
|
||||
properties:
|
||||
code:
|
||||
$ref: '#/components/schemas/GradeCode'
|
||||
title:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
description: Display name in Russian. Plain text.
|
||||
SpecializationCatalog:
|
||||
type: object
|
||||
description: Catalog of directions, specializations, and the grade scale that the questionnaire and the assessment use. The catalog is reference data and identical for every caller; it contains no personal data.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- directions
|
||||
- grades
|
||||
properties:
|
||||
directions:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Directions in display order.
|
||||
items:
|
||||
$ref: '#/components/schemas/CatalogDirection'
|
||||
grades:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 10
|
||||
description: Grade scale in ascending order.
|
||||
items:
|
||||
$ref: '#/components/schemas/CatalogGrade'
|
||||
QuestionnaireVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 0
|
||||
description: Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.
|
||||
examples:
|
||||
- 3
|
||||
StackTag:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 50
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: 'Free technology tag of the candidate''s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.'
|
||||
WorkFormat:
|
||||
type: string
|
||||
description: 'Acceptable work format: `remote`, `office`, or `hybrid`.'
|
||||
enum:
|
||||
- remote
|
||||
- office
|
||||
- hybrid
|
||||
WorkContext:
|
||||
type: object
|
||||
description: Working context of the candidate's search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- work_formats
|
||||
properties:
|
||||
work_formats:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
description: Acceptable work formats.
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkFormat'
|
||||
CandidateExperience:
|
||||
type: object
|
||||
description: 'Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- commercial_months
|
||||
- academic_months
|
||||
properties:
|
||||
commercial_months:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 600
|
||||
description: Months of commercial work in the specialization.
|
||||
academic_months:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 600
|
||||
description: Months of study, internships, or academic projects in the specialization.
|
||||
QuestionnaireSpecialization:
|
||||
type: object
|
||||
description: 'One specialization chosen by the candidate with the candidate''s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- self_assessed_grade
|
||||
- task_languages
|
||||
- stack
|
||||
- experience
|
||||
properties:
|
||||
specialization:
|
||||
$ref: '#/components/schemas/SpecializationCode'
|
||||
self_assessed_grade:
|
||||
$ref: '#/components/schemas/GradeCode'
|
||||
task_languages:
|
||||
type: array
|
||||
maxItems: 2
|
||||
uniqueItems: true
|
||||
description: Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.
|
||||
items:
|
||||
$ref: '#/components/schemas/TaskLanguage'
|
||||
stack:
|
||||
type: array
|
||||
maxItems: 20
|
||||
uniqueItems: true
|
||||
description: Technology tags of the candidate in this specialization.
|
||||
items:
|
||||
$ref: '#/components/schemas/StackTag'
|
||||
experience:
|
||||
description: Stated experience, or null when the candidate did not state it.
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/CandidateExperience'
|
||||
- type: 'null'
|
||||
CandidateQuestionnaire:
|
||||
type: object
|
||||
description: 'Questionnaire of the current candidate: the chosen specializations with self-assessed grades and the working context. It never contains a confirmed grade or a category; those come only from assessment results. A candidate who has not saved the questionnaire yet gets version 0, no specializations, and null `work_context` and `updated_at`.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- version
|
||||
- specializations
|
||||
- work_context
|
||||
- updated_at
|
||||
properties:
|
||||
version:
|
||||
$ref: '#/components/schemas/QuestionnaireVersion'
|
||||
specializations:
|
||||
type: array
|
||||
maxItems: 2
|
||||
description: Chosen specializations in the order the candidate gave them, each specialization at most once. Each one is assessed independently.
|
||||
items:
|
||||
$ref: '#/components/schemas/QuestionnaireSpecialization'
|
||||
work_context:
|
||||
description: Working context, or null before the first save.
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/WorkContext'
|
||||
- type: 'null'
|
||||
updated_at:
|
||||
description: Time of the last change, or null before the first save.
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/Timestamp'
|
||||
- type: 'null'
|
||||
CandidateQuestionnaireUpdate:
|
||||
type: object
|
||||
description: Complete new state of the questionnaire. It replaces the stored specializations and working context as a whole. Unknown fields are rejected, so a request cannot set a confirmed grade or a category.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
- specializations
|
||||
- work_context
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: '#/components/schemas/QuestionnaireVersion'
|
||||
specializations:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
description: One or two chosen specializations. The schema limits the count; the server also requires each specialization to appear at most once and answers a repeated one with 400 validation_failed and the pointer of the repeated item's `specialization`, for example `/specializations/1/specialization`.
|
||||
items:
|
||||
$ref: '#/components/schemas/QuestionnaireSpecialization'
|
||||
work_context:
|
||||
$ref: '#/components/schemas/WorkContext'
|
||||
HealthResponse:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@@ -1035,6 +1461,39 @@ components:
|
||||
examples:
|
||||
csrf_check_failed:
|
||||
$ref: '#/components/examples/CsrfCheckFailed'
|
||||
CsrfCheckFailedOrForbidden:
|
||||
description: 'The request failed cross-site request protection, code csrf_check_failed: the X-CSRF-Token header is missing or does not belong to the session, or the Origin is not allowed. Or the account may not perform the operation, code forbidden. Nothing was changed in either case.'
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Problem'
|
||||
examples:
|
||||
csrf_check_failed:
|
||||
$ref: '#/components/examples/CsrfCheckFailed'
|
||||
forbidden:
|
||||
$ref: '#/components/examples/Forbidden'
|
||||
QuestionnaireValidationFailed:
|
||||
description: 'The body does not match the contract or violates a questionnaire rule: more than two specializations, an unknown specialization, grade, or task language, an unknown field such as confirmed_grade, a repeated specialization, or a task language that the specialization''s published bank does not offer; code validation_failed with body pointers. When the decoder does not record the path of a nested field, the pointer is the whole body. Nothing was changed.'
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Problem'
|
||||
examples:
|
||||
too_many_specializations:
|
||||
$ref: '#/components/examples/QuestionnaireTooManySpecializations'
|
||||
unknown_grade:
|
||||
$ref: '#/components/examples/QuestionnaireUnknownGrade'
|
||||
repeated_specialization:
|
||||
$ref: '#/components/examples/QuestionnaireRepeatedSpecialization'
|
||||
QuestionnaireVersionConflict:
|
||||
description: '`expected_version` is not the current questionnaire version; code version_conflict. Nothing was changed; read the questionnaire again before retrying.'
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Problem'
|
||||
examples:
|
||||
version_conflict:
|
||||
$ref: '#/components/examples/VersionConflict'
|
||||
securitySchemes:
|
||||
sessionCookie:
|
||||
type: apiKey
|
||||
@@ -1242,6 +1701,142 @@ components:
|
||||
scenario: candidate
|
||||
onboarding_step: candidate_questionnaire
|
||||
created_at: '2026-10-05T09:30:00Z'
|
||||
SpecializationCatalog:
|
||||
summary: Illustrative MVP catalog with the Backend and Network Engineer banks published
|
||||
description: Illustrative values. The directions, specializations, and grades follow the MVP scale; `test_availability` comes from the published task banks, so the grades and languages shown here are not a statement about any deployed bank.
|
||||
value:
|
||||
directions:
|
||||
- code: development
|
||||
title: Разработка
|
||||
specializations:
|
||||
- code: backend
|
||||
title: Backend
|
||||
test_availability:
|
||||
status: available
|
||||
grades:
|
||||
- intern
|
||||
- junior
|
||||
- middle
|
||||
- senior
|
||||
task_languages:
|
||||
- python
|
||||
- go
|
||||
note: null
|
||||
- code: frontend
|
||||
title: Frontend
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: mobile
|
||||
title: Mobile
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: infrastructure
|
||||
title: Инфраструктура
|
||||
specializations:
|
||||
- code: network_engineer
|
||||
title: Сетевой инженер
|
||||
test_availability:
|
||||
status: available
|
||||
grades:
|
||||
- junior
|
||||
- middle
|
||||
task_languages: []
|
||||
note: null
|
||||
- code: devops_sre
|
||||
title: DevOps/SRE
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: data
|
||||
title: Данные
|
||||
specializations:
|
||||
- code: data_analyst
|
||||
title: Аналитик данных
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: ds_ml
|
||||
title: DS/ML
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: security
|
||||
title: Безопасность
|
||||
specializations:
|
||||
- code: information_security
|
||||
title: Информационная безопасность
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
- code: quality
|
||||
title: Качество
|
||||
specializations:
|
||||
- code: qa
|
||||
title: QA
|
||||
test_availability:
|
||||
status: in_development
|
||||
grades: []
|
||||
task_languages: []
|
||||
note: Тест в разработке.
|
||||
grades:
|
||||
- code: intern
|
||||
title: Стажер
|
||||
- code: junior
|
||||
title: Junior
|
||||
- code: middle
|
||||
title: Middle
|
||||
- code: senior
|
||||
title: Senior
|
||||
NewCandidateQuestionnaire:
|
||||
summary: A candidate who has not saved the questionnaire yet
|
||||
value:
|
||||
version: 0
|
||||
specializations: []
|
||||
work_context: null
|
||||
updated_at: null
|
||||
BackendGoAndNetworkEngineerQuestionnaire:
|
||||
summary: Backend with Go and Network Engineer, two independent specializations
|
||||
description: Go is a task language of the `backend` specialization and PostgreSQL and gRPC are stack tags; none of them is a category. The candidate has two specializations, `backend` and `network_engineer`, each assessed independently. The self-assessed grades are claims; no confirmed grade appears.
|
||||
value:
|
||||
version: 3
|
||||
specializations:
|
||||
- specialization: backend
|
||||
self_assessed_grade: middle
|
||||
task_languages:
|
||||
- go
|
||||
stack:
|
||||
- PostgreSQL
|
||||
- gRPC
|
||||
- Kafka
|
||||
experience:
|
||||
commercial_months: 30
|
||||
academic_months: 12
|
||||
- specialization: network_engineer
|
||||
self_assessed_grade: junior
|
||||
task_languages: []
|
||||
stack:
|
||||
- Cisco IOS
|
||||
- BGP
|
||||
experience: null
|
||||
work_context:
|
||||
work_formats:
|
||||
- remote
|
||||
- hybrid
|
||||
updated_at: '2026-10-05T09:30:00Z'
|
||||
Forbidden:
|
||||
summary: The caller may not access the object
|
||||
value:
|
||||
@@ -1251,15 +1846,75 @@ components:
|
||||
code: forbidden
|
||||
detail: You do not have permission to perform this operation.
|
||||
trace_id: 7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d
|
||||
StateConflict:
|
||||
summary: The resource state does not allow the operation
|
||||
BackendGoAndNetworkEngineerQuestionnaireUpdate:
|
||||
summary: Save Backend with Go and Network Engineer over version 2
|
||||
value:
|
||||
type: urn:lincodex:problem:state_conflict
|
||||
title: Resource state conflict
|
||||
status: 409
|
||||
code: state_conflict
|
||||
detail: The resource is in a state that does not allow this operation.
|
||||
trace_id: 1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b
|
||||
expected_version: 2
|
||||
specializations:
|
||||
- specialization: backend
|
||||
self_assessed_grade: middle
|
||||
task_languages:
|
||||
- go
|
||||
stack:
|
||||
- PostgreSQL
|
||||
- gRPC
|
||||
- Kafka
|
||||
experience:
|
||||
commercial_months: 30
|
||||
academic_months: 12
|
||||
- specialization: network_engineer
|
||||
self_assessed_grade: junior
|
||||
task_languages: []
|
||||
stack:
|
||||
- Cisco IOS
|
||||
- BGP
|
||||
experience: null
|
||||
work_context:
|
||||
work_formats:
|
||||
- remote
|
||||
- hybrid
|
||||
QuestionnaireTooManySpecializations:
|
||||
summary: Three specializations were sent; at most two are allowed
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /specializations
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
QuestionnaireUnknownGrade:
|
||||
summary: A self-assessed grade outside the grade scale, such as lead
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 7d8e9f0a-1b2c-4d3e-9f4a-5b6c7d8e9f0a
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /specializations/0/self_assessed_grade
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
QuestionnaireRepeatedSpecialization:
|
||||
summary: The same specialization was chosen twice
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 8e9f0a1b-2c3d-4e4f-8a5b-6c7d8e9f0a1b
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /specializations/1/specialization
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
VersionConflict:
|
||||
summary: If-Match does not match the current version
|
||||
value:
|
||||
@@ -1269,6 +1924,15 @@ components:
|
||||
code: version_conflict
|
||||
detail: The resource changed after it was read. Read it again before retrying.
|
||||
trace_id: 3e4f5a6b-7c8d-4e9f-8a0b-2c3d4e5f6a7b
|
||||
StateConflict:
|
||||
summary: The resource state does not allow the operation
|
||||
value:
|
||||
type: urn:lincodex:problem:state_conflict
|
||||
title: Resource state conflict
|
||||
status: 409
|
||||
code: state_conflict
|
||||
detail: The resource is in a state that does not allow this operation.
|
||||
trace_id: 1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b
|
||||
PayloadTooLarge:
|
||||
summary: The request body exceeds the limit
|
||||
value:
|
||||
|
||||
@@ -12,6 +12,15 @@ tags:
|
||||
Registration, email verification, login, logout, and the current
|
||||
account. Sessions are server-side and travel in an HttpOnly cookie;
|
||||
mutating requests that require a session also carry a CSRF token.
|
||||
- name: catalog
|
||||
description: >-
|
||||
Public reference data: directions, specializations with their
|
||||
assessment availability, and the grade scale.
|
||||
- name: candidate
|
||||
description: >-
|
||||
Data of the current candidate, such as the questionnaire with the
|
||||
chosen specializations and self-assessed grades. Confirmed grades and
|
||||
categories come only from assessment results.
|
||||
# Operations require a session unless they declare `security: []`, so a new
|
||||
# operation that omits security is protected by default.
|
||||
security:
|
||||
@@ -33,6 +42,10 @@ paths:
|
||||
$ref: ./routes/identity_sessions_current.yml
|
||||
/api/v1/identity/me:
|
||||
$ref: ./routes/identity_me.yml
|
||||
/api/v1/specializations:
|
||||
$ref: ./routes/catalog_specializations.yml
|
||||
/api/v1/me/questionnaire:
|
||||
$ref: ./routes/candidate_questionnaire.yml
|
||||
components:
|
||||
schemas:
|
||||
Problem:
|
||||
@@ -85,6 +98,42 @@ components:
|
||||
$ref: ./components/schemas.yml#/Account
|
||||
Session:
|
||||
$ref: ./components/schemas.yml#/Session
|
||||
DirectionCode:
|
||||
$ref: ./components/schemas.yml#/DirectionCode
|
||||
SpecializationCode:
|
||||
$ref: ./components/schemas.yml#/SpecializationCode
|
||||
GradeCode:
|
||||
$ref: ./components/schemas.yml#/GradeCode
|
||||
TaskLanguage:
|
||||
$ref: ./components/schemas.yml#/TaskLanguage
|
||||
TestAvailabilityStatus:
|
||||
$ref: ./components/schemas.yml#/TestAvailabilityStatus
|
||||
TestAvailability:
|
||||
$ref: ./components/schemas.yml#/TestAvailability
|
||||
CatalogSpecialization:
|
||||
$ref: ./components/schemas.yml#/CatalogSpecialization
|
||||
CatalogDirection:
|
||||
$ref: ./components/schemas.yml#/CatalogDirection
|
||||
CatalogGrade:
|
||||
$ref: ./components/schemas.yml#/CatalogGrade
|
||||
SpecializationCatalog:
|
||||
$ref: ./components/schemas.yml#/SpecializationCatalog
|
||||
QuestionnaireVersion:
|
||||
$ref: ./components/schemas.yml#/QuestionnaireVersion
|
||||
StackTag:
|
||||
$ref: ./components/schemas.yml#/StackTag
|
||||
WorkFormat:
|
||||
$ref: ./components/schemas.yml#/WorkFormat
|
||||
WorkContext:
|
||||
$ref: ./components/schemas.yml#/WorkContext
|
||||
CandidateExperience:
|
||||
$ref: ./components/schemas.yml#/CandidateExperience
|
||||
QuestionnaireSpecialization:
|
||||
$ref: ./components/schemas.yml#/QuestionnaireSpecialization
|
||||
CandidateQuestionnaire:
|
||||
$ref: ./components/schemas.yml#/CandidateQuestionnaire
|
||||
CandidateQuestionnaireUpdate:
|
||||
$ref: ./components/schemas.yml#/CandidateQuestionnaireUpdate
|
||||
parameters:
|
||||
IdempotencyKey:
|
||||
$ref: ./components/parameters.yml#/IdempotencyKey
|
||||
@@ -142,6 +191,12 @@ components:
|
||||
$ref: ./components/responses.yml#/InvalidCredentials
|
||||
CsrfCheckFailed:
|
||||
$ref: ./components/responses.yml#/CsrfCheckFailed
|
||||
CsrfCheckFailedOrForbidden:
|
||||
$ref: ./components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
QuestionnaireValidationFailed:
|
||||
$ref: ./components/responses.yml#/QuestionnaireValidationFailed
|
||||
QuestionnaireVersionConflict:
|
||||
$ref: ./components/responses.yml#/QuestionnaireVersionConflict
|
||||
securitySchemes:
|
||||
sessionCookie:
|
||||
type: apiKey
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
get:
|
||||
operationId: GetMyQuestionnaire
|
||||
summary: Read the questionnaire of the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. A candidate who has not saved the questionnaire yet gets 200 with version 0 and no specializations rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing questionnaire is not an error state.
|
||||
|
||||
The response never contains a confirmed grade or a category; those come only from assessment results. A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- candidate
|
||||
responses:
|
||||
"200":
|
||||
description: The questionnaire of the current candidate.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateQuestionnaire
|
||||
examples:
|
||||
new_candidate:
|
||||
$ref: ../components/examples.yml#/NewCandidateQuestionnaire
|
||||
backend_go_and_network_engineer:
|
||||
$ref: ../components/examples.yml#/BackendGoAndNetworkEngineerQuestionnaire
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/Forbidden
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
put:
|
||||
operationId: SaveMyQuestionnaire
|
||||
summary: Replace the questionnaire of the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new state: one or two specializations, each with a self-assessed grade, task languages, stack tags, and stated experience or null, and the working context. It replaces the stored questionnaire as a whole.
|
||||
|
||||
Self-assessment is a claim. It influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never writes a confirmed grade or a category: a self-assessed `senior`, or the word "Senior" in a stack tag, never assigns the Senior category. A real profile stays invisible to employers until an assessment confirms a category. Choosing a specialization whose test is `in_development` is allowed; no assessment starts for it until its bank is published. Removing a specialization from the questionnaire does not change assessment results.
|
||||
|
||||
Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first save. If it is not the current version, the server answers 412 version_conflict and changes nothing; the client reads the questionnaire again. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet. The status and code are the same as for a failed If-Match, since the client action is the same.
|
||||
|
||||
The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose specializations and working context equal the stored ones changes nothing, keeps the version, and answers 200 with the current questionnaire even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), domain rules (400), then the version (412). The schema rejects more than two specializations, an unknown grade, specialization, or task language, and unknown fields. The server also rejects a repeated specialization and a task language that the specialization's published bank does not offer, with 400 validation_failed and pointers to the items, for example `/specializations/1/specialization` or `/specializations/0/task_languages/0`.
|
||||
|
||||
A successful save on the onboarding step candidate_questionnaire advances the account to candidate_assessment (planned).
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- candidate
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateQuestionnaireUpdate
|
||||
examples:
|
||||
backend_go_and_network_engineer:
|
||||
$ref: ../components/examples.yml#/BackendGoAndNetworkEngineerQuestionnaireUpdate
|
||||
responses:
|
||||
"200":
|
||||
description: The saved questionnaire with its new version.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateQuestionnaire
|
||||
examples:
|
||||
backend_go_and_network_engineer:
|
||||
$ref: ../components/examples.yml#/BackendGoAndNetworkEngineerQuestionnaire
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/QuestionnaireValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/QuestionnaireVersionConflict
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,24 @@
|
||||
get:
|
||||
operationId: GetSpecializationCatalog
|
||||
summary: Read the catalog of directions, specializations, and grades.
|
||||
description: |-
|
||||
Public operation without a session. Returns the directions with their specializations, the assessment availability of each specialization, and the grade scale. The candidate picks specializations and self-assessed grades from this catalog for the questionnaire, and the client joins the codes stored in the questionnaire with the titles here.
|
||||
|
||||
The catalog is public because it is the same for every caller and contains no personal data: the product shows it before registration, and a public read lets intermediaries and the browser cache it. It reveals nothing beyond what the landing pages already show.
|
||||
|
||||
A category is a specialization together with a confirmed grade. Task languages and the stack are attributes of a chosen specialization and never appear as categories. `test_availability` is derived from the published task banks at the time of the request, so it changes when a bank is published, without a contract change: the MVP opens an assessment only for a category with a published bank, and every other specialization is marked `in_development`. Presence in the catalog never means that its test is ready.
|
||||
security: []
|
||||
tags:
|
||||
- catalog
|
||||
responses:
|
||||
"200":
|
||||
description: The catalog.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/SpecializationCatalog
|
||||
examples:
|
||||
mvp:
|
||||
$ref: ../components/examples.yml#/SpecializationCatalog
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
Reference in new issue
Block a user