Repository navigation
[WIP] Add a first draft of the API documentation - #2917
Open
Chrystinne wants to merge 1 commit into
Open
Chrystinne wants to merge 1 commit into
Chrystinne wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API endpoints under
/api/are currently undocumented. This adds a first draft of the documentation indocs/API.md, so we can review the content and decide where it should live.What's covered
/api/v1/(list, search, versions, detail, access status andSHA256SUMS.txt), with parameters, response fields andcurlexamples. The example responses come from the public API./api/v1/project/published/...paths.The OAuth and OpenID Connect endpoints for partner applications are not covered here.
Where to document the API
This draft is a Markdown file in the repository, so it is versioned and reviewed together with the code. Other options:
/about/api/), so API users can find it without going to GitHub.drf-spectacular), with an interactive page. This keeps the docs in sync automatically, but adds a dependency.Notes for reviewers
The draft documents the current behaviour, which differs from some of the view docstrings:
abstractis returned as HTML.core_doi,version_doiandpublish_datein the list;doiandpublish_datetimein the detail).Fixing the docstrings, and deciding whether the list should be paginated, could follow in a separate PR.