@acadix/setup
Version:
Acadix Learning Management System backend application project setup
85 lines (84 loc) • 2.64 kB
TypeScript
import { DocPathType, DocSchemaType, DocServerType, DocTagType } from "..";
export default class DocumentationBuilder {
static generateDocumentation(serverList: DocServerType[], schemas: DocSchemaType, paths: DocPathType[], tags: DocTagType[]): {
paths: Record<string, object>;
tags: {
name: string;
}[];
components: {
schemas: {
successResponse: {
type: string;
properties: {
status: {
type: string;
};
message: {
type: string;
};
data: {
type: string;
};
};
};
errorResponse: {
type: string;
properties: {
status: {
type: string;
};
message: {
type: string;
};
code: {
type: string;
};
};
};
serverError: {
type: string;
properties: {
status: {
type: string;
};
message: {
type: string;
};
code: {
type: string;
};
};
};
};
securitySchemes: {
BearerAuth: {
type: string;
in: string;
scheme: string;
name: string;
bearerFormat: string;
};
CookieAuth: {
type: string;
in: string;
name: string;
};
};
};
servers: {
url: string;
description: string;
}[];
openapi: string;
info: {
title: string;
description: string;
version: string;
contact: {
name: string;
email: string;
url: string;
};
};
};
}