tariffs/src/constants/default.ts
2022-12-25 20:10:23 +00:00

47 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { FastifyServerOptions } from "fastify";
import type { FastifyDynamicSwaggerOptions } from "@fastify/swagger";
import type { FastifySwaggerUiOptions } from "@fastify/swagger-ui";
type Default = {
readonly fastifyOptions: FastifyServerOptions;
readonly swaggerOptions: FastifyDynamicSwaggerOptions;
readonly swaggerUIOptions: FastifySwaggerUiOptions;
};
export const DEFAULT: Default = {
fastifyOptions: {
logger: true,
ajv: {
customOptions: { removeAdditional: "failing" },
},
bodyLimit: 30 * 1024 * 1024,
},
swaggerOptions: {
openapi: {
info: {
title: "Hub Admin Backend",
description: "Тестирование сервиса админ панели хаба",
version: "0.1.0",
},
components: {
securitySchemes: {
bearer: {
description: "Authorization header token, sample: Bearer <token>",
type: "http",
bearerFormat: "JWT",
scheme: "bearer",
},
},
},
},
hideUntagged: true,
},
swaggerUIOptions: {
routePrefix: "/swagger",
uiConfig: {
docExpansion: "full",
deepLinking: false,
},
},
};