recator placement of code
This commit is contained in:
87
backend/scaler/register.spec.ts
Normal file
87
backend/scaler/register.spec.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import type { OpenAPIV3_1 } from "openapi-types";
|
||||
|
||||
export const prodRegisterSpec: OpenAPIV3_1.PathsObject = {
|
||||
"/api/authentication/register": {
|
||||
post: {
|
||||
summary: "Register",
|
||||
description: "Registers a new user.",
|
||||
tags: ["Auth"],
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
required: ["username", "password", "email"],
|
||||
properties: {
|
||||
username: {
|
||||
type: "string",
|
||||
example: "jdoe",
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
format: "string",
|
||||
example: "joe",
|
||||
},
|
||||
email: {
|
||||
type: "string",
|
||||
format: "email",
|
||||
example: "joe.doe@alpla.net",
|
||||
},
|
||||
password: {
|
||||
type: "string",
|
||||
format: "password",
|
||||
example: "superSecretPassword",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
"200": {
|
||||
description: "User info",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
success: {
|
||||
type: "boolean",
|
||||
format: "true",
|
||||
example: true,
|
||||
},
|
||||
message: {
|
||||
type: "string",
|
||||
example: "User was created",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"400": {
|
||||
description: "Invalid Data was sent over",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
success: {
|
||||
type: "boolean",
|
||||
format: "false",
|
||||
example: false,
|
||||
},
|
||||
message: {
|
||||
type: "string",
|
||||
format: "Invalid Data was sent over.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user