chore: generate OpenAPI specification

This commit is contained in:
Paul Makles
2023-01-29 16:56:34 +00:00
parent 4744424ea1
commit e6a46c29a3
+176 -18
View File
@@ -13,7 +13,7 @@
"name": "AGPLv3",
"url": "https://github.com/revoltchat/delta/blob/master/LICENSE"
},
"version": "0.5.5"
"version": "0.5.7"
},
"servers": [
{
@@ -187,6 +187,48 @@
]
}
},
"/users/{target}/flags": {
"get": {
"tags": [
"User Information"
],
"summary": "Fetch User Flags",
"description": "Retrieve a user's flags.",
"operationId": "fetch_user_flags_fetch_user_flags",
"parameters": [
{
"name": "target",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/Id"
}
}
],
"responses": {
"default": {
"description": "An error occurred.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FlagResponse"
}
}
}
}
}
}
},
"/users/@me/username": {
"patch": {
"tags": [
@@ -4154,6 +4196,9 @@
}
},
"security": [
{
"Session Token": []
},
{
"Session Token": []
}
@@ -4873,6 +4918,7 @@
"type": "object",
"required": [
"app",
"build",
"features",
"revolt",
"vapid",
@@ -4902,6 +4948,14 @@
"vapid": {
"description": "Web Push VAPID public key",
"type": "string"
},
"build": {
"description": "Build information",
"allOf": [
{
"$ref": "#/components/schemas/BuildInformation"
}
]
}
}
},
@@ -5018,6 +5072,39 @@
}
}
},
"BuildInformation": {
"title": "Build Information",
"type": "object",
"required": [
"commit_sha",
"commit_timestamp",
"origin_url",
"semver",
"timestamp"
],
"properties": {
"commit_sha": {
"description": "Commit Hash",
"type": "string"
},
"commit_timestamp": {
"description": "Commit Timestamp",
"type": "string"
},
"semver": {
"description": "Git Semver",
"type": "string"
},
"origin_url": {
"description": "Git Origin URL",
"type": "string"
},
"timestamp": {
"description": "Build Timestamp",
"type": "string"
}
}
},
"Permission": {
"description": "Permission value on Revolt\n\nThis should be restricted to the lower 52 bits to prevent any potential issues with Javascript. Also leave empty spaces for future permission flags to be added.",
"type": "string",
@@ -5658,6 +5745,20 @@
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"InvalidProperty"
]
}
}
},
{
"type": "object",
"required": [
@@ -6104,6 +6205,20 @@
"Id": {
"type": "string"
},
"FlagResponse": {
"title": "Flag Response",
"type": "object",
"required": [
"flags"
],
"properties": {
"flags": {
"description": "Flags",
"type": "integer",
"format": "int32"
}
}
},
"DataEditUser": {
"title": "User Data",
"type": "object",
@@ -7602,6 +7717,25 @@
"type": "string"
}
}
},
{
"description": "Streamable Video",
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Streamable"
]
},
"id": {
"type": "string"
}
}
}
]
},
@@ -7710,7 +7844,7 @@
"nullable": true
},
"restrict_reactions": {
"description": "Whether reactions should be restricted to the given list",
"description": "Whether reactions should be restricted to the given list\n\nCan only be set to true if reactions list is of at least length 1",
"type": "boolean"
}
}
@@ -7729,7 +7863,7 @@
"avatar": {
"description": "Replace the avatar shown on this message (URL to image file)",
"type": "string",
"maxLength": 128,
"maxLength": 256,
"minLength": 1,
"nullable": true
},
@@ -9014,6 +9148,12 @@
],
"nullable": true
},
"server_flags": {
"description": "Enum of server flags",
"type": "integer",
"format": "int32",
"nullable": true
},
"channel_id": {
"description": "Id of server channel",
"type": "string"
@@ -9164,7 +9304,7 @@
}
}
},
"RAuth Error": {
"Authifier Error": {
"title": "Error",
"oneOf": [
{
@@ -9277,6 +9417,20 @@
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"BlockedByShield"
]
}
}
},
{
"type": "object",
"required": [
@@ -9403,20 +9557,6 @@
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"DisabledAccount"
]
}
}
},
{
"type": "object",
"required": [
@@ -9771,6 +9911,24 @@
}
}
}
},
{
"type": "object",
"required": [
"result",
"user_id"
],
"properties": {
"result": {
"type": "string",
"enum": [
"Disabled"
]
},
"user_id": {
"type": "string"
}
}
}
]
},