Tweaking ping titles and body constructs

This commit is contained in:
🐙PiperYxzzy
2022-05-05 23:15:59 +02:00
parent 99402ebdf0
commit 403cc51e12
4 changed files with 310 additions and 219 deletions

View File

@@ -9,8 +9,7 @@
"paths": {
"/adm/doot": {
"get": {
"description": "admin ping and login check",
"summary": "ping example",
"summary": "Admin ming",
"parameters": [
{
"type": "string",
@@ -35,30 +34,12 @@
"summary": "User login",
"parameters": [
{
"description": "user email",
"name": "userkey",
"description": "email, password and 2FA code. 2FA code is required",
"name": "login",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "user password",
"name": "password",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "the 2fa token",
"name": "twofactorcode",
"in": "body",
"required": true,
"schema": {
"type": "string"
"$ref": "#/definitions/core.login"
}
}
],
@@ -83,8 +64,7 @@
},
"/doot": {
"get": {
"description": "unauthenticated ping",
"summary": "ping example",
"summary": "Unauthenticated Ping",
"responses": {}
}
},
@@ -100,12 +80,12 @@
"summary": "Forgot password",
"parameters": [
{
"description": "user email to reset",
"description": "email to reset",
"name": "userkey",
"in": "body",
"required": true,
"schema": {
"type": "string"
"$ref": "#/definitions/core.forgotten"
}
}
],
@@ -131,29 +111,12 @@
"summary": "User login",
"parameters": [
{
"description": "user email",
"name": "userkey",
"description": "Login information",
"name": "login",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "user password",
"name": "password",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "the 2fa token for the user, if activated",
"name": "twofactorcode",
"in": "body",
"schema": {
"type": "string"
"$ref": "#/definitions/core.login"
}
}
],
@@ -188,21 +151,12 @@
"summary": "Password reset",
"parameters": [
{
"description": "the token emailed to the user",
"name": "token",
"description": "the reset token and the password",
"name": "reset",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "the new password value",
"name": "password",
"in": "body",
"required": true,
"schema": {
"type": "string"
"$ref": "#/definitions/core.reset"
}
}
],
@@ -221,8 +175,7 @@
},
"/sec/doot": {
"get": {
"description": "user ping and login check",
"summary": "ping example",
"summary": "User ping",
"parameters": [
{
"type": "string",
@@ -247,21 +200,12 @@
"summary": "User signup",
"parameters": [
{
"description": "user email",
"name": "userkey",
"description": "The signup information",
"name": "signup",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "user password",
"name": "password",
"in": "body",
"required": true,
"schema": {
"type": "string"
"$ref": "#/definitions/core.signup"
}
}
],
@@ -274,6 +218,96 @@
}
}
}
},
"/verify": {
"post": {
"description": "Email verification based on a token sent to a registered email",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "User verify",
"parameters": [
{
"type": "string",
"description": "Verification JWT",
"name": "verify",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": ""
},
"401": {
"description": "bad token"
}
}
}
}
},
"definitions": {
"core.forgotten": {
"type": "object",
"required": [
"userkey"
],
"properties": {
"userkey": {
"type": "string"
}
}
},
"core.login": {
"type": "object",
"required": [
"password",
"userkey"
],
"properties": {
"password": {
"type": "string"
},
"twofactorcode": {
"type": "string"
},
"userkey": {
"type": "string"
}
}
},
"core.reset": {
"type": "object",
"required": [
"password",
"token"
],
"properties": {
"password": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"core.signup": {
"type": "object",
"required": [
"password",
"userkey"
],
"properties": {
"password": {
"type": "string"
},
"userkey": {
"type": "string"
}
}
}
}
}