MCPcopy
hub / github.com/YMFE/yapi / createResponse

Function createResponse

common/markdown.js:243–255  ·  view source on GitHub ↗
(res_body, res_body_is_json_schema, res_body_type)

Source from the content-addressed store, hash-verified

241}
242
243function createResponse(res_body, res_body_is_json_schema, res_body_type) {
244 let resTitle = `\n### 返回数据\n\n`;
245 if (res_body) {
246 if (res_body_is_json_schema && res_body_type === 'json') {
247 let resBody = createSchemaTable(res_body);
248 return resTitle + resBody;
249 } else {
250 let resBody = '```javascript' + `\n${res_body || ''}\n` + '```';
251 return resTitle + resBody;
252 }
253 }
254 return '';
255}
256
257function createInterMarkdown(basepath, listItem, isToc) {
258 let mdTemplate = ``;

Callers 1

createInterMarkdownFunction · 0.85

Calls 1

createSchemaTableFunction · 0.85

Tested by

no test coverage detected