mirror of
https://github.com/logos-messaging/logos-messaging-rest-api.git
synced 2026-01-02 14:03:13 +00:00
Merge pull request #16 from waku-org/feat-lightpush-v3-rest-api
feat: Define lightpush v3 api fix: store api field names
This commit is contained in:
commit
0c3615f330
@ -1,6 +1,6 @@
|
||||
post:
|
||||
summary: Request a message relay from a LightPush service provider
|
||||
description: Push a message to be relayed on a PubSub topic.
|
||||
summary: Request a message relay from a `Legacy` LightPush service provider
|
||||
description: Push a message to be relayed on a PubSub topic. Notice this version of the /lightpush endpoint will be depricated.
|
||||
operationId: postMessagesToPubsubTopic
|
||||
tags:
|
||||
- lightpush
|
||||
72
api-spec/lightpushapi_v3.yaml
Normal file
72
api-spec/lightpushapi_v3.yaml
Normal file
@ -0,0 +1,72 @@
|
||||
post:
|
||||
summary: Request a message relay from a LightPush service provider
|
||||
description: Push a message to be relayed on a PubSub topic.
|
||||
operationId: postMessagesToPubsubTopic
|
||||
tags:
|
||||
- lightpush
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'400':
|
||||
description: Bad request.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'413':
|
||||
description: Payload too large.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'420':
|
||||
description: Invalid message.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'421':
|
||||
description: Unsupported pubsub topic.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'429':
|
||||
description: Too many requests
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'503':
|
||||
description: Service not available
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'504':
|
||||
description: Out of RLN proof
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
'505':
|
||||
description: No peers to relay
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './schemas/apitypes.yaml#/PushResponse'
|
||||
@ -40,7 +40,9 @@ paths:
|
||||
/health:
|
||||
$ref: "./healthapi.yaml"
|
||||
/lightpush/v1/message:
|
||||
$ref: "./lightpushapi.yaml"
|
||||
$ref: "./lightpushapi_legacy.yaml"
|
||||
/lightpush/v3/message:
|
||||
$ref: "./lightpushapi_v3.yaml"
|
||||
/relay/v1/messages/{pubsubTopic}:
|
||||
$ref: "./relayapi_messages.yaml"
|
||||
/relay/v1/subscriptions:
|
||||
|
||||
@ -145,23 +145,23 @@ WakuMessageKeyValue:
|
||||
StoreQueryResponse:
|
||||
type: object
|
||||
properties:
|
||||
request_id:
|
||||
requestId:
|
||||
type: string
|
||||
status_code:
|
||||
statusCode:
|
||||
type: integer
|
||||
format: uint32
|
||||
status_desc:
|
||||
statusDesc:
|
||||
type: string
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WakuMessageKeyValue'
|
||||
pagination_cursor:
|
||||
paginationCursor:
|
||||
type: string
|
||||
required:
|
||||
- request_id
|
||||
- status_code
|
||||
- status_desc
|
||||
- requestId
|
||||
- statusCode
|
||||
- statusDesc
|
||||
- messages
|
||||
|
||||
PushRequest:
|
||||
@ -174,6 +174,16 @@ PushRequest:
|
||||
required:
|
||||
- message
|
||||
|
||||
PushResponse:
|
||||
type: object
|
||||
properties:
|
||||
statusDesc:
|
||||
type: string
|
||||
relayPeerCount:
|
||||
type: integer
|
||||
format: uint32
|
||||
|
||||
|
||||
## TODO: Check if it can be tunneled into the one WakuMessage structure
|
||||
## mainly because of Relay post message request can break in client code
|
||||
RelayWakuMessage:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user