Commit 4f40219f authored by ariovistus's avatar ariovistus
Browse files

Merge pull request #302 from davidrenne/master

Update docgenerator.py
parents 011fe8a8 f78b8d79
......@@ -342,10 +342,10 @@ class DocumentationGenerator(object):
has_many = isinstance(field, ListSerializer)
if has_many:
f['type'] = 'array'
if data_type in BaseMethodIntrospector.PRIMITIVES:
f['items'] = {'type': data_type}
else:
if field_serializer:
f['items'] = {'$ref': field_serializer}
elif data_type in BaseMethodIntrospector.PRIMITIVES:
f['items'] = {'type': data_type}
# memorize discovered field
data['fields'][name] = f
......
......@@ -13,8 +13,8 @@
<link href="{% static 'rest_framework_swagger/css/screen.css' %}" media="screen" rel="stylesheet" type="text/css"/>
{% endblock %}
</head>
<body>
{% block body %}
{% block header %}
<div id="header">
<div class="swagger-ui-wrap">
......@@ -95,6 +95,7 @@
window.swaggerUi.load();
});
</script>
{% endblock %}
</body>
</html>
{% endspaceless %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment