Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generated API Documentation #129

Open
rmedlyn opened this issue Aug 7, 2020 · 1 comment
Open

Auto-generated API Documentation #129

rmedlyn opened this issue Aug 7, 2020 · 1 comment

Comments

@rmedlyn
Copy link
Contributor

rmedlyn commented Aug 7, 2020

WIP on APIDocs-Swagger branch.

Swagger is a specification for API Documentation.

This uses drf-yasg to generate documentation for all api endpoints based on a docstring placed after the class declaration of the view in the following format.

class Test(APIView):
    """
        Description of what the endpoint does

        * All required and optional arguments, query parameters and filters in the form `param` -- Description of param
        * Can be a list or part of a list

For Example:
        **Required Query Parameters:**
        * ONE of the following:
            * `registered_ip` -- IP address registered to an address
            * `ip_address` -- Either a registered IP or a leased IP
    """
    pass
@rmedlyn
Copy link
Contributor Author

rmedlyn commented Aug 7, 2020

At the very minimum, the comments on API views in this branch would be nice to have.

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

No branches or pull requests

1 participant