nope/specs/apiDoc.ts
2020-08-19 08:36:59 +02:00

25 lines
519 B
TypeScript

/**
* Function to generate the Base Api Documentation
* @param title The Title of the API
* @param version The Version
* @param basePath A Basepath for the API
*/
export function apiDoc(title: string, version: string, basePath: string){
// Default API Doc
const apiDoc = {
swagger: '2.0',
basePath: basePath || '/v1',
info: {
title,
version
},
definitions: {
},
paths: {}
};
return apiDoc;
}
export default apiDoc;