seedling/source/api/src/plugins/swagger.ts
Roman Jaroš 5246efb027 Add API monorepo
Change-Id: I39aa1707744bb86c4bc9113157bbf815bb3fe33a
2023-09-10 22:25:09 +02:00

26 lines
523 B
TypeScript

// @ts-nocheck
import { Server } from '@hapi/hapi';
const version = require('../../package.json').version;
export default async (server: Server) => {
return server.register([
require('@hapi/inert'),
require('@hapi/vision'),
{
plugin: require('hapi-swagger'),
options: {
info: {
title: 'Many API',
version,
},
swaggerUI: true,
documentationPage: true,
documentationPath: '/swagger',
pathPrefixSize: 3,
basePath: '/api/v1',
reuseDefinitions: false,
},
},
]);
};