Add swagger doc for the link pusher -> admin (#2146)

* Dissociate admin API from external API
* Add adminAPI doc for self-hosted
This commit is contained in:
César Cardinale
2022-05-11 17:43:25 +02:00
committed by GitHub
parent 253ae60478
commit 5016c85ca4
9 changed files with 350 additions and 21 deletions
+12 -5
View File
@@ -34,11 +34,17 @@ export const isFetchMemberDataByUuidResponse = z.object({
description: "URL of the visitCard of the user fetched.",
example: "https://mycompany.com/contact/me",
}),
textures: extendApi(z.array(isWokaDetail), { $ref: "#/definitions/WokaDetail" }),
messages: extendApi(z.array(z.unknown()), { description: "List of user's messages." }),
textures: extendApi(z.array(isWokaDetail), {
description: "This data represents the textures (WOKA) that will be available to users.",
$ref: "#/definitions/WokaDetail",
}),
messages: extendApi(z.array(z.unknown()), {
description:
"Sets messages that will be displayed when the user logs in to the WA room. These messages are used for ban or ban warning.",
}),
anonymous: extendApi(z.optional(z.boolean()), {
description: "Whether the user if logged as anonymous or not",
description: "Defines whether it is possible to login as anonymous on a WorkAdventure room.",
example: false,
}),
userRoomToken: extendApi(z.optional(z.string()), { description: "", example: "" }),
@@ -110,7 +116,7 @@ class AdminApi implements AdminInterface {
* example: "998ce839-3dea-4698-8b41-ebbdf7688ad9"
* responses:
* 200:
* description: The details of the member
* description: The details of the map
* schema:
* $ref: "#/definitions/MapDetailsData"
* 401:
@@ -162,7 +168,7 @@ class AdminApi implements AdminInterface {
* /api/room/access:
* get:
* tags: ["AdminAPI"]
* description: Returns member's informations if he can access this room
* description: Returns the member's information if he can access this room
* security:
* - Bearer: []
* produces:
@@ -181,6 +187,7 @@ class AdminApi implements AdminInterface {
* example: "http://play.workadventure.localhost/@/teamSlug/worldSLug/roomSlug"
* - name: "ipAddress"
* in: "query"
* description: "IP Address of the user logged in, allows you to check whether a user has been banned or not"
* required: true
* type: "string"
* example: "127.0.0.1"