oioioi.base.utils.api

Module Contents

Functions

make_path_coreapi_schema(name[, title, description, ...])

This function helps to create documentation for path parameter.

oioioi.base.utils.api.make_path_coreapi_schema(name, title=None, description=None, required=True, **kwargs)[source]

This function helps to create documentation for path parameter.

By default they get no description unless it is model based view. It can be fixed by specifying custom coreapi fields with proper names generated by this function. The list of such fields should be passed to AutoSchema and override APIView schema parameter.

You can see more in Django Rest Framework code: https://github.com/encode/django-rest-framework/blob/5c2290d97380ca15005f7d42ffceae04dc817dba/rest_framework/schemas/inspectors.py#L149