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

Review and fill out embedded API documentation. #42

Open
Tracked by #21
anjackson opened this issue Jan 9, 2023 · 0 comments
Open
Tracked by #21

Review and fill out embedded API documentation. #42

anjackson opened this issue Jan 9, 2023 · 0 comments
Assignees

Comments

@anjackson
Copy link
Contributor

anjackson commented Jan 9, 2023

The FastAPI annotations are used to add basic API documentation. This should be review to see if it makes sense, and in particular, any existing parameters that do not have much or any documentation should be updates to include brief descriptions.

As an example. Is the CDX API documentation clear? Does the current setup make it sufficiently clear that only limited values are allowed for particular parameters?

async def lookup_url(
url: AnyHttpUrl = Query(
...,
title="URL to find.",
description="URL to look for (will canonicalize the URL before running the query).",
example='http://portico.bl.uk/'
),
matchType: Optional[schemas.LookupMatchType] = Query(
schemas.LookupMatchType.exact,
title='Type of match to look for.'
),
sort: Optional[schemas.LookupSort] = Query(
schemas.LookupSort.default,
title='Order to return results.'
),
limit: Union[int, None] = Query(
None,
title='Number of matching records to return.'
),
):
# Only put through allowed parameters:
params = {
'url': url,
'matchType': matchType.value,
'sort': sort.value,
'limit': limit,

@anjackson anjackson changed the title Review and fill out documentation e.g. for parameters for all calls. Review and fill out documentation. Jan 9, 2023
@anjackson anjackson changed the title Review and fill out documentation. Review and fill out embedded API documentation. Jan 9, 2023
@anjackson anjackson removed their assignment Jan 13, 2023
ldbiz added a commit to ldbiz/ukwa-access-api that referenced this issue Jan 20, 2023
ldbiz added a commit to ldbiz/ukwa-access-api that referenced this issue Jan 24, 2023
ldbiz added a commit to ldbiz/ukwa-access-api that referenced this issue Jan 24, 2023
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

2 participants