From b72c42b2d621b01e979ea7963eebcd79d53abd42 Mon Sep 17 00:00:00 2001 From: Matthew R Kasun Date: Mon, 18 Sep 2023 11:32:12 -0400 Subject: [PATCH] superadmin creation --- swagger.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/swagger.yml b/swagger.yml index 9d1727ae7..2b9a2f41c 100644 --- a/swagger.yml +++ b/swagger.yml @@ -1,3 +1,4 @@ +--- openapi: 3.0.1 servers: - url: https://api.demo.netmaker.io @@ -941,6 +942,18 @@ paths: summary: check for superadmin tags: - admin + /api/users/adm/createsuperadmin: + post: + operationId: createSuperAdmin + requestBody: + $ref: '#/components/requestBodies/user' + responses: + '200': + $ref: '#/components/responses/returnedUser' + summary: create superadmin + tags: + - admin + components: securitySchemes: bearerAuth: @@ -1638,6 +1651,23 @@ components: application/json: schema: $ref: '#/components/schemas/signal' + returnedUser: + description: user resonse + content: + application/json: + schema: + type: object + properties: + Username: + type: string + IsSuperAdmin: + type: boolean + IsAdmin: + type: boolean + RemoteGWIDs: + type: array + items: + type: string userGroup: description: User Group content: @@ -1726,7 +1756,7 @@ components: type: string Password: type: string - userGroup: + user: content: application/json: schema: