Browse Source

use apispec auto generate names

Bastien Sevajol 6 years ago
parent
commit
fd7db3e77c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      hapic/doc.py

+ 4 - 0
hapic/doc.py View File

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__