Support TS, swagger,Template(xls,docx),PDF convert
This commit is contained in:
parent
b221deb1cf
commit
8d7654423a
84 changed files with 3604 additions and 1 deletions
36
libs/create-swagger-spec.ts
Normal file
36
libs/create-swagger-spec.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// https://swagger.io/docs/specification/about/
|
||||
import swaggerJsdoc from "swagger-jsdoc"
|
||||
import fs from 'fs'
|
||||
const swaggerOptions = {
|
||||
definition: {
|
||||
openapi: "3.1.0",
|
||||
info: {
|
||||
title: "Report Server",
|
||||
version: "0.1.0",
|
||||
description:
|
||||
"Advance Create and convert document API for microservice.",
|
||||
license: {
|
||||
name: "by Frappet",
|
||||
url: "https://frappet.com",
|
||||
},
|
||||
},
|
||||
servers: [
|
||||
{
|
||||
url: "https://report-server.frappet.synology.me",
|
||||
},
|
||||
{
|
||||
url: "http://localhost:3000",
|
||||
},
|
||||
{
|
||||
url: "http://192.168.2.100:3000",
|
||||
},
|
||||
],
|
||||
},
|
||||
apis: ["./libs/*.ts"],
|
||||
};
|
||||
export function createSpec(){
|
||||
const swaggerSpecs = swaggerJsdoc(swaggerOptions);
|
||||
fs.promises.writeFile("libs/swagger-specs.json",JSON.stringify(swaggerSpecs,null,2))
|
||||
}
|
||||
createSpec()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue