mirror of
https://github.com/logos-messaging/logos-messaging-rest-api.git
synced 2026-05-18 08:09:33 +00:00
Define lightpush v3 api, rename ligthpush to legacy. Fix discrepancy of store api.
This commit is contained in:
parent
cdd6ad218b
commit
12e5456d82
@ -1,6 +1,6 @@
|
|||||||
post:
|
post:
|
||||||
summary: Request a message relay from a LightPush service provider
|
summary: Request a message relay from a `Legacy` LightPush service provider
|
||||||
description: Push a message to be relayed on a PubSub topic.
|
description: Push a message to be relayed on a PubSub topic. Notice this version of the /lightpush endpoint will be depricated.
|
||||||
operationId: postMessagesToPubsubTopic
|
operationId: postMessagesToPubsubTopic
|
||||||
tags:
|
tags:
|
||||||
- lightpush
|
- 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:
|
/health:
|
||||||
$ref: "./healthapi.yaml"
|
$ref: "./healthapi.yaml"
|
||||||
/lightpush/v1/message:
|
/lightpush/v1/message:
|
||||||
$ref: "./lightpushapi.yaml"
|
$ref: "./lightpushapi_legacy.yaml"
|
||||||
|
/lightpush/v3/message:
|
||||||
|
$ref: "./lightpushapi_v3.yaml"
|
||||||
/relay/v1/messages/{pubsubTopic}:
|
/relay/v1/messages/{pubsubTopic}:
|
||||||
$ref: "./relayapi_messages.yaml"
|
$ref: "./relayapi_messages.yaml"
|
||||||
/relay/v1/subscriptions:
|
/relay/v1/subscriptions:
|
||||||
|
|||||||
@ -145,23 +145,23 @@ WakuMessageKeyValue:
|
|||||||
StoreQueryResponse:
|
StoreQueryResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
request_id:
|
requestId:
|
||||||
type: string
|
type: string
|
||||||
status_code:
|
statusCode:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: uint32
|
||||||
status_desc:
|
statusDesc:
|
||||||
type: string
|
type: string
|
||||||
messages:
|
messages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/WakuMessageKeyValue'
|
$ref: '#/components/schemas/WakuMessageKeyValue'
|
||||||
pagination_cursor:
|
paginationCursor:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- request_id
|
- requestId
|
||||||
- status_code
|
- statusCode
|
||||||
- status_desc
|
- statusDesc
|
||||||
- messages
|
- messages
|
||||||
|
|
||||||
PushRequest:
|
PushRequest:
|
||||||
@ -174,6 +174,16 @@ PushRequest:
|
|||||||
required:
|
required:
|
||||||
- message
|
- 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
|
## TODO: Check if it can be tunneled into the one WakuMessage structure
|
||||||
## mainly because of Relay post message request can break in client code
|
## mainly because of Relay post message request can break in client code
|
||||||
RelayWakuMessage:
|
RelayWakuMessage:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user