add invite api docs

This commit is contained in:
2026-04-07 11:11:53 +02:00
parent abe247e46f
commit e6f0170644
4 changed files with 452 additions and 0 deletions

View File

@@ -1290,6 +1290,138 @@ const docTemplate = `{
}
}
},
"/user/invite": {
"get": {
"description": "List active invite tokens",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "List active invite tokens",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.RegisterToken"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
}
}
},
"post": {
"description": "Create new invite token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Create new invite token",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.RegisterToken"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
}
}
}
},
"/user/invite/{id}": {
"delete": {
"description": "Delete invite token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Delete invite token",
"parameters": [
{
"type": "string",
"description": "invite token id",
"name": "id",
"in": "path"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.EmptyResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/httputil.HTTPError"
}
}
}
}
},
"/user/login": {
"post": {
"description": "Login user",
@@ -1644,6 +1776,29 @@ const docTemplate = `{
}
}
},
"models.RegisterToken": {
"type": "object",
"required": [
"token"
],
"properties": {
"createdAt": {
"type": "string"
},
"deletedAt": {
"$ref": "#/definitions/gorm.DeletedAt"
},
"id": {
"type": "integer"
},
"token": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
"models.Ressource": {
"type": "object",
"properties": {