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

Function createSchemaTable

common/markdown.js:225–241  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

223}
224
225function createSchemaTable(body) {
226 let template = ``;
227 let dataSource = schema.schemaTransformToTable(json_parse(body));
228 template += `<table>
229 <thead class="ant-table-thead">
230 <tr>
231 ${tableHeader(columns)}
232 </tr>
233 </thead>`;
234
235 template += `<tbody className="ant-table-tbody">${tableBody(dataSource, columns, 0)}
236 </tbody>
237 </table>
238 `;
239
240 return template;
241}
242
243function createResponse(res_body, res_body_is_json_schema, res_body_type) {
244 let resTitle = `\n### 返回数据\n\n`;

Callers 2

createReqBodyFunction · 0.85
createResponseFunction · 0.85

Calls 3

json_parseFunction · 0.85
tableHeaderFunction · 0.85
tableBodyFunction · 0.85

Tested by

no test coverage detected