Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Add better handling of Arrays and Objects #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

winsmith
Copy link

@winsmith winsmith commented Jul 17, 2017

The _get_parameter method now handles arrays and objects slighlty better. Before, it would simply output type string for arrays, whereas now it tries to inspect objects and arrays in order to output type information for them.

This change enables slightly more helpful display of nested serializers when using e.g. Django-Rest-Framework with django-rest-swagger.

This is not recursive, so it goes only one level deep, but right now I can't see an easy way to achieve that.

The _get_parameter method now handles arrays and objects slighlty better. Before, it would simply output type `string` for arrays, whereas now it tries to inspect objects and arrays in order to output type information for them. This is not recursive, so it goes only one level deep.
@korbinianfritsch
Copy link

Included this into a project of mine and it helps getting a better understanding of the rendered schema, for example in django-rest-swagger.

+1 for tackling this.

@xxmatyuk
Copy link

+1
but tried to do the same here so far with no luck of attention or understanding. But works good for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants