"Agraid to Ask" feature redesigned with SpecKit 62
This commit is contained in:
93
specs/004-afraid-to-ask/contracts/openapi.yaml
Normal file
93
specs/004-afraid-to-ask/contracts/openapi.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Agree-on-Desires API
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/sessions/{sessionId}/responses:
|
||||
post:
|
||||
summary: Submit a user's response for a session, including "Afraid to Ask" ideas.
|
||||
parameters:
|
||||
- in: path
|
||||
name: sessionId
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the session.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
userId:
|
||||
type: string
|
||||
description: The ID of the user submitting the response.
|
||||
wants:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: A list of ideas the user wants.
|
||||
accepts:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: A list of ideas the user accepts.
|
||||
afraidToAsk:
|
||||
type: string
|
||||
description: A sensitive idea the user is afraid to ask, to be processed privately.
|
||||
required:
|
||||
- userId
|
||||
responses:
|
||||
'200':
|
||||
description: Response successfully submitted.
|
||||
'400':
|
||||
description: Invalid input.
|
||||
'500':
|
||||
description: Internal server error, or semantic matching service unavailable.
|
||||
/sessions/{sessionId}/results:
|
||||
get:
|
||||
summary: Retrieve the harmonized results for a session.
|
||||
parameters:
|
||||
- in: path
|
||||
name: sessionId
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the session.
|
||||
responses:
|
||||
'200':
|
||||
description: Session results retrieved successfully.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
sessionId:
|
||||
type: string
|
||||
harmonizedIdeas:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: The list of harmonized ideas, including matched "Afraid to Ask" ideas.
|
||||
'404':
|
||||
description: Session not found.
|
||||
'500':
|
||||
description: Internal server error.
|
||||
/sessions/{sessionId}/terminate:
|
||||
post:
|
||||
summary: Terminate a session and purge all associated "Afraid to Ask" data.
|
||||
parameters:
|
||||
- in: path
|
||||
name: sessionId
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the session to terminate.
|
||||
responses:
|
||||
'200':
|
||||
description: Session terminated and data purged successfully.
|
||||
'404':
|
||||
description: Session not found.
|
||||
'500':
|
||||
description: Internal server error.
|
||||
Reference in New Issue
Block a user