Inactive Sessions Purging designed
This commit is contained in:
67
specs/009-inactive-sessions-purging/contracts/openapi.yaml
Normal file
67
specs/009-inactive-sessions-purging/contracts/openapi.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Session and Form Persistence API
|
||||
version: 1.0.0
|
||||
|
||||
paths:
|
||||
/api/session/form-data/{formId}:
|
||||
get:
|
||||
summary: Retrieve persisted form data for a specific form
|
||||
parameters:
|
||||
- in: path
|
||||
name: formId
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Identifier of the form
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved form data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
'404':
|
||||
description: Form data not found
|
||||
delete:
|
||||
summary: Clear persisted form data for a specific form
|
||||
parameters:
|
||||
- in: path
|
||||
name: formId
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Identifier of the form
|
||||
responses:
|
||||
'204':
|
||||
description: Form data successfully cleared
|
||||
'404':
|
||||
description: Form data not found
|
||||
|
||||
components:
|
||||
schemas:
|
||||
FormInput:
|
||||
type: object
|
||||
properties:
|
||||
fieldId:
|
||||
type: string
|
||||
description: Identifier for the input field
|
||||
value:
|
||||
type: string
|
||||
description: The current value of the input field
|
||||
|
||||
# WebSocket API (conceptual, not directly in OpenAPI)
|
||||
# The WebSocket API will handle real-time updates for form persistence.
|
||||
# Messages from client to server:
|
||||
# - type: "FORM_UPDATE"
|
||||
# payload:
|
||||
# formId: string
|
||||
# fieldId: string
|
||||
# value: string
|
||||
# Messages from server to client:
|
||||
# - type: "FORM_STATE_SYNC"
|
||||
# payload:
|
||||
# formId: string
|
||||
# formState: object (map of fieldId to value)
|
||||
Reference in New Issue
Block a user