puppy-api-docs
Version:
Genernate material api docs from your comments.
19 lines (18 loc) • 561 B
JavaScript
/**
* Class to hold a single api document.
*/
class Doc {
constructor(data) {
this.title = data.title;
this.method = data.method;
this.description = data.description;
this.path = data.path;
this.response = data.response;
this.request = data.request;
this.queryParams = data.queryParams;
this.requestHeaders = data.requestHeaders;
this.responseHeaders = data.responseHeaders;
this.group = typeof data.group === 'string' ? data.group : undefined;
}
}
module.exports = Doc;