mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +03:00
added input types to inspected schemas
This commit is contained in:
parent
0e10d32fb1
commit
cf85ac97fd
|
@ -105,7 +105,11 @@ def field_to_schema(field):
|
||||||
format='textarea'
|
format='textarea'
|
||||||
)
|
)
|
||||||
|
|
||||||
return coreschema.String(title=title, description=description)
|
return coreschema.String(
|
||||||
|
title=title,
|
||||||
|
description=description,
|
||||||
|
format=getattr(field, 'style', {}).get('input_type'),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_pk_description(model, model_field):
|
def get_pk_description(model, model_field):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user