Both lizard_structure.items and lizard_structure.views have helper functions and base classes. We document them here to keep the view and the item definitions documentation clean.
Base view that provides custom docstring rendering.
You should not have to subclass from BaseAPIView yourself, it is only used as a base for the other ones. The custom docstring handling happens by overwriting the get_description() expected by Django Rest framework.
Base class for the other items.
Flexible implementation so that we only have to specify the fixed and the default values (as dictionaries).
Generate a docstring based on the class’s defaults/fixed attributes.
Use this function as a metaclass by adding __metaclass__ = generate_docstring to every individual subclass of BaseItem.