摘要: 1.安装库 **pip install drf-yasg** 2.配置setting INSTALLED_APPS = [ ... 'drf_yasg', ... ] 3.配置全局路由文件urls.py 点击查看代码 from drf_yasg.views import get_schema_vie 阅读全文
posted @ 2022-03-09 18:23 一枚码农 阅读(1159) 评论(1) 推荐(1) 编辑
摘要: 转自:https://www.cnblogs.com/alantammm/p/15214853.html 字段描述 是 来源于 模型类中字段的 help_text 的值.(name = models.CharField(_('名称'), max_length=128, help_text='名称') 阅读全文
posted @ 2022-03-09 16:17 一枚码农 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1.安装jsonschema **pip install jsonschema** 2.代码 点击查看代码 from jsonschema import validate def verify_code_2_member(data: dict): schema = { "type": "object 阅读全文
posted @ 2022-03-09 15:57 一枚码农 阅读(142) 评论(0) 推荐(0) 编辑