wip: swagger

This commit is contained in:
Davidson Gomes
2023-10-02 09:24:53 -03:00
parent 5c74cbfe19
commit e1ac29683d
8 changed files with 1311 additions and 2 deletions

17
src/docs/swagger.conf.ts Normal file
View File

@@ -0,0 +1,17 @@
import { Router } from 'express';
import { join } from 'path';
import swaggerUi from 'swagger-ui-express';
import YAML from 'yamljs';
const document = YAML.load(join(process.cwd(), 'src', 'docs', 'swagger.yaml'));
const router = Router();
export const swaggerRouter = router.use('/docs', swaggerUi.serve).get(
'/docs',
swaggerUi.setup(document, {
customCssUrl: '/css/dark-theme-swagger.css',
customSiteTitle: 'Evolution API',
customfavIcon: '/images/logo.svg',
}),
);

1282
src/docs/swagger.yaml Normal file

File diff suppressed because it is too large Load Diff