# HG changeset patch # User Kim Alvefur # Date 1621954006 -7200 # Node ID 82df1eed45d18c4ca432ab8e49a945e875df76e8 # Parent 9cbdb60e21f2b311020d7d58517e24be1a54c2aa mod_rest: Add various XML metadata to OpenAPI spec diff -r 9cbdb60e21f2 -r 82df1eed45d1 mod_rest/res/openapi.yaml --- a/mod_rest/res/openapi.yaml Mon May 24 16:36:35 2021 +0200 +++ b/mod_rest/res/openapi.yaml Tue May 25 16:46:46 2021 +0200 @@ -149,9 +149,10 @@ message: type: object + xml: + name: message properties: kind: - kind: description: Which kind of stanza type: string enum: @@ -388,11 +389,16 @@ priority: description: Presence priority - type: string + type: integer + maximum: 127 + minimum: -128 state: description: Chat state notifications, e.g. "is typing..." type: string + xml: + namespace: http://jabber.org/protocol/chatstates + x_name_is_value: true enum: - active - inactive @@ -404,15 +410,27 @@ nick: type: string description: Nickname of the sender + xml: + name: nick + namespace: http://jabber.org/protocol/nick delay: type: string + format: date-time description: Timestamp of when a stanza was delayed, in ISO 8601 / XEP-0082 format. + xml: + name: delay + namespace: urn:xmpp:delay + x_single_attribute: stamp replace: type: string description: ID of message being replaced (e.g. for corrections) + xml: + name: replace + namespace: urn:xmpp:message-correct:0 + x_single_attribute: id join: description: For joining Multi-User-Chats @@ -612,6 +630,9 @@ payload: description: A piece of arbitrary JSON with a type field attached type: object + xml: + name: payload + namespace: urn:xmpp:json-msg:0 required: - datatype - data @@ -682,15 +703,25 @@ stats: description: Statistics type: array + xml: + name: query + namespace: http://jabber.org/protocol/stats + wrapped: true items: type: object properties: name: type: string + xml: + attribute: true unit: type: string + xml: + attribute: true value: type: string + xml: + attribute: true error: description: Description of something gone wrong. See the Stanza Errors section in RFC 6120.