nope/specs/apiDoc.ts

25 lines
519 B
TypeScript
Raw Normal View History

2020-08-19 06:36:59 +00:00
/**
* 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;