Commit b21233a6 authored by metacertain's avatar metacertain Committed by GitHub

Pss oas (#765)

* Add Pss endpoints
Co-authored-by: default avataracud <12988138+acud@users.noreply.github.com>
parent 1a9cd573
......@@ -556,3 +556,51 @@ paths:
$ref: 'SwarmCommon.yaml#/components/responses/500'
default:
description: Default response
'/pss/send/{topic}/{targets}':
post:
summary: Send to recipient or target with Postal Service for Swarm
tags:
- Postal Service for Swarm
parameters:
- in: path
name: topic
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssTopic'
required: true
description: Topic name
- in: path
name: targets
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssTargets'
required: true
description: Target message address prefix. If multiple targets are specified, only one would be matched.
- in: query
name: recipient
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/PssRecipient'
required: false
description: Recipient publickey
responses:
'200':
description: Subscribed to topic
'400':
$ref: 'SwarmCommon.yaml#/components/responses/400'
'500':
$ref: 'SwarmCommon.yaml#/components/responses/500'
default:
description: Default response
'/pss/subscribe/{topic}':
get:
summary: Subscribe for messages on the given topic.
tags:
- Pss subscribe
responses:
'200':
description: Returns a WebSocket with a subscription for incoming message data on the requested topic.
'500':
$ref: 'SwarmCommon.yaml#/components/responses/500'
default:
description: Default response
......@@ -207,6 +207,15 @@ components:
pinCounter:
type: integer
PssRecipient:
type: string
PssTargets:
type: string
PssTopic:
type: string
ProblemDetails:
type: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment