def _simpletype(self, schema):
rows = []
if 'title' in schema and self.nesting > 1:
rows.append(self._line(self._cell('*'+schema['title']+'*')))
if 'description' in schema:
rows.append(self._line(self._cell(schema['description'])))
if 'type' in schema:
rows.append(self._line(self._cell('type'), self._decodetype(schema['type'])))
if 'enum' in schema:
rows.append(self._line(self._cell('enum'), self._cell(', '.join([str_unicode(e) for e in schema['enum']]))))
rows.extend(self._kvpairs(schema, self.KV_SIMPLE))
return rows
评论列表
文章目录