ordered (bool) – If True, the resulting schema dictionary is ordered. Fields are
listed in the order they are added to the class. Schema properties are
also ordered in a sensible and consistent way, making the schema more
human-readable.

The second element is a JSON schema of the document, and the first is
a dictionary that contains definitions that are referenced from the schema.

Parameters:

role (str) – A role.

ordered (bool) – If True, the resulting schema dictionary is ordered. Fields are
listed in the order they are added to the class. Schema properties are
also ordered in a sensible and consistent way, making the schema more
human-readable.

ref_documents (set) – If subclass of Document is in this set, all DocumentField s
pointing to it will be resolved as a reference: {"$ref":"#/definitions/..."}.
Note: resulting definitions will not contain schema for this document.