-
Notifications
You must be signed in to change notification settings - Fork 301
autogenerate API documentation #479
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
Conversation
Not sure it's needed, but the docmentation says to do it.
- allow the example app to still run, just failing any JSONAPIDjangoFilter tests. - split the two filters into separate files for easier maintenance.
- Had a mistake (unquoted '.') and missing '-' as an allowed character. Also '_' already in '\w' - Don't be so exhaustive in testing for invalid filters; let JSONAPIQueryValidationFilter (when available) deal with that.
I'm not quite sure if I the Adding |
@sliverc please take a look at this. |
I seem to have figured out how to test RTD. See https://testing-django-rest-framework-json-api.readthedocs.io/en/sphinx-apidoc/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍 This is a good improvement to our documentation.
I am not a sphinx expert but I have seen in other projects that it should be completely auto generatable without the need of a bunch of apidoc rst files.
One of them is SpiffWorkflow. Maybe we can have a look there how it is done. Makes maintaining API documentation even easier as we do not have to think about adding any new modules to the sphinx doc.
Those apidoc files are "autogenerated" by sphinx-apidoc (via tox -e sphinx) but I would love to not even have to remember to do that step since the updated files then have to be committed/pushed. I'll try and take a look at SpiffWorkflow or other options, unless your or someone else wants to chime in with a commit here, which I would welcome. Should use reST or MarkDown in docstrings? I prefer the later, but it seems reST is the dominant case and it's not a big deal to have to use |
@n2ygk Let's use reST as it is more powerful and in the long run I would prefer that we only use reST in the whole project (otherwise it is fairly confusing in what context what markup language needs to be used) I unfortunately do not have a lot of experience with sphinx so if someone else with experience could look at this as well that would be great. |
…ing lots of older tests that use non-standard query params like page_size
Kudos to @sliverc and SpiffWorkflow for the idea: sartography/SpiffWorkflow@4d2dac0#r30534816
…lter query parameter. This makes a consistent error message irrespective of whether QueryParameterValidation is used.
…ery param validation (not queryset)
Great work. Two comments:
|
I will stick them back together. Even though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thanks.
Fixes #478
Description of the Change
Autogenerate API reference documentation from the Python docstrings, superseding docs/api.md which is out of date.
Checklist
CHANGELOG.md
AUTHORS