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

Set up API rest endpoint online documentation #29

Closed
3 tasks done
lbeaufort opened this issue Feb 1, 2022 · 2 comments
Closed
3 tasks done

Set up API rest endpoint online documentation #29

lbeaufort opened this issue Feb 1, 2022 · 2 comments
Assignees
Labels
defect Something isn't working technical debt

Comments

@lbeaufort
Copy link
Member

lbeaufort commented Feb 1, 2022

Business Reason

The django-rest-swagger package is no longer supported, and is not compatible with Django 3.x. When we upgraded to Django 3.x, we broke the API documentation.

See https://fecfile-web-api-dev.app.cloud.gov/api/docs
and marcgibbons/django-rest-swagger#832 and marcgibbons/django-rest-swagger#815

Task Install the drf-spectacular python package and configure for use in fecfile-web-api

As a developer, I will be able to get access to the fecfile REST API via my browser so that I can have access to documentation describing the REST endpoints

Acceptance Criteria

QA

QA Notes

null

DEV Notes

null

Design

null

@lbeaufort lbeaufort added defect Something isn't working technical debt labels Feb 1, 2022
@mjtravers mjtravers self-assigned this Feb 1, 2022
@mjtravers mjtravers removed their assignment Feb 9, 2022
@mjtravers mjtravers changed the title API docs not working Set up API rest endpoint online documentation Feb 9, 2022
@lbeaufort
Copy link
Member Author

lbeaufort commented Mar 2, 2022

I confirmed that the built-in API documentation that comes with Django REST framework (https://www.django-rest-framework.org/) doesn't have a user friendly built-in index of endpoints. Example index: https://restframework.herokuapp.com/ ("snippets" and "users" are the endpoints)

This tutorial demonstrates the difference between what comes out of the box for Django REST framework and what drf-spectaclar (https://drf-spectacular.readthedocs.io/en/latest/index.html) offers: https://rohitkrgupta.medium.com/swagger-with-django-made-easy-a-drf-spectacular-explainer-20b18bb4c33c

Here's what the docs look like on the UAT site: https://uat-fecfile-api.efdev.fec.gov/api/docs

@lbeaufort lbeaufort assigned toddlees and unassigned lbeaufort Mar 24, 2022
@toddlees toddlees assigned WiseQA and unassigned toddlees Mar 25, 2022
@WiseQA
Copy link

WiseQA commented Mar 25, 2022

Verified link https://fecfile-web-api-dev.app.cloud.gov/api/docs, that an UI is seen and lets me explore the fecfile API:
image.png

QA review completed. Moved to Stage Ready.

@WiseQA WiseQA assigned MitchellTCG and unassigned WiseQA Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working technical debt
Projects
None yet
Development

No branches or pull requests

5 participants