feat(api): declare identity contract for registration, verification, and sessions

This commit is contained in:
shira committed 2026-10-05 22:57:19 +03:00
1 parent 197661145e
commit 653f3775f8
86 files changed
+11826 -148

No files matched your search

@@ -0,0 +1,37 @@
get:
operationId: GetConsentText
summary: Read the currently published text of a registration consent.
description: |-
Public operation without a session. Returns the current text of a consent that is given before an account exists; only `c1` is available. The registration page shows this text and sends its `text_version` with RegisterAccount, and the server hashes the same stored text when it records the acceptance. If the text changes while the page is open, RegisterAccount answers 400 validation_failed with the pointer `/consent_c1/text_version`, and the page reads the text again. An unknown purpose fails parameter validation with 400.
security: []
tags:
- identity
parameters:
- name: purpose
in: path
required: true
description: Consent whose text is requested.
schema:
$ref: ../components/schemas.yml#/ConsentPurpose
responses:
"200":
description: The current consent text.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ConsentText
examples:
c1:
summary: Current C1 text
value:
purpose: c1
text_version: c1-2026-10-01
text: |-
I consent to the processing of my personal data for registration and the use of the service.
The full text is published by the operator.
published_at: "2026-10-01T00:00:00Z"
"400":
$ref: ../components/responses.yml#/ValidationFailed
default:
$ref: ../components/responses.yml#/Problem