Mercurial > prosody-modules
comparison mod_rest/openapi.yaml @ 4477:8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Example:
POST /rest/message/chat/juliet@example.net
{ body: "Hello" }
Becomes equivalent to
POST /rest
{ kind: "message", type: "chat", to: "juliet@example.net", body: "Hello" }
Sending messages as plain/text also becomes more convenient.
IQ stazas are still weird, but we'll do something special for those.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 28 Feb 2021 19:25:45 +0100 |
| parents | 125279f4a5b8 |
| children | 7ab0c423688a |
comparison
equal
deleted
inserted
replaced
| 4476:125279f4a5b8 | 4477:8df6cc648963 |
|---|---|
| 60 422: | 60 422: |
| 61 description: The was a problem with the format (but not the syntax) of the | 61 description: The was a problem with the format (but not the syntax) of the |
| 62 payload. | 62 payload. |
| 63 415: | 63 415: |
| 64 description: Unsupported mediatype. | 64 description: Unsupported mediatype. |
| 65 /rest/{kind}/{type}/{to}: | |
| 66 post: | |
| 67 responses: | |
| 68 200: | |
| 69 description: Okay | |
| 70 security: | |
| 71 - basic: [] | |
| 72 - token: [] | |
| 73 summary: Even more RESTful mapping. | |
| 74 parameters: | |
| 75 - name: kind | |
| 76 in: path | |
| 77 required: true | |
| 78 schema: | |
| 79 $ref: '#/components/schemas/kind' | |
| 80 - name: type | |
| 81 in: path | |
| 82 required: true | |
| 83 schema: | |
| 84 $ref: '#/components/schemas/type' | |
| 85 - name: to | |
| 86 in: path | |
| 87 required: true | |
| 88 schema: | |
| 89 $ref: '#/components/schemas/to' | |
| 65 components: | 90 components: |
| 66 schemas: | 91 schemas: |
| 67 stanza: | 92 stanza: |
| 68 properties: | 93 properties: |
| 69 delay: | 94 delay: |
