Infer ChoiceField type from model field when in ModelSerializer

Fixes part of issue #69
This commit is contained in:
Cristi Vîjdea
2018-02-26 20:31:12 +02:00
parent 3f7ad62950
commit ee46f59fb1
7 changed files with 67 additions and 13 deletions
+10
View File
@@ -591,6 +591,16 @@ definitions:
cover_name:
type: string
readOnly: true
article_type:
description: IntegerField declared on model with choices=(...) and exposed
via ModelSerializer
type: integer
enum:
- 1
- 2
- 3
- 7
- 8
Project:
required:
- projectName