Files
lst_v3/backend/scaler/register.spec.ts

88 lines
1.7 KiB
TypeScript

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.",
},
},
},
},
},
},
},
},
},
};