浏览代码

use apispec auto generate names

Bastien Sevajol 7 年前
父节点
当前提交
fd7db3e77c
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hapic/doc.py

+ 4 - 0
hapic/doc.py 查看文件

156
                 'apispec.ext.bottle',
156
                 'apispec.ext.bottle',
157
                 'apispec.ext.marshmallow',
157
                 'apispec.ext.marshmallow',
158
             ],
158
             ],
159
+            schema_name_resolver_callable=generate_schema_name,
159
         )
160
         )
160
 
161
 
161
         schemas = []
162
         schemas = []
220
         #             # TODO: use description to feed apispec
221
         #             # TODO: use description to feed apispec
221
         #             print(route.method, path, description)
222
         #             print(route.method, path, description)
222
         #             continue
223
         #             continue
224
+
225
+def generate_schema_name(schema):
226
+    return schema.__name__