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

Confusing documentation of the citation object #2174

Open
cweider opened this issue Oct 1, 2023 · 0 comments
Open

Confusing documentation of the citation object #2174

cweider opened this issue Oct 1, 2023 · 0 comments

Comments

@cweider
Copy link

cweider commented Oct 1, 2023

The documentation for “Case” describes the content of citations as an “array of citation objects”. I was inclined to follow the spec under the “Citation” heading, but it does not describe what I see in the API. It’s likely that citations described refer to something else entirely – and don’t exist! A subsection for citation may need to be added to “Case” and the “Citation” section struck.

Documentation:

## Case
{
"id": (int),
"url": (API url to this case),
"name": (string),
"name_abbreviation": (string),
"decision_date": (string),
"docket_number": (string),
"first_page": (string),
"last_page": (string),
"citations": [array of citation objects],

## Citation
{
"id": (int),
"cite": (string),
"cited_by": (url)
},

What an observe matches what I see in generating code of serializers.py – a dictionary with two keys: "type" and "cite".

Generating Code:

{"type": c["type"], "cite": c["cite"]} for c in s["citations"]

class CitationSerializer(serializers.ModelSerializer):
class Meta:
model = models.Citation
fields = ("type", "cite")

In the documentation “Case” and “Citation” are sibling headings – could it be that “Citation” refers to a route? If it does, that route doesn’t exist anymore.

Routes:

router = routers.DefaultRouter()
router.register('cases', api_views.CaseDocumentViewSet, basename="cases")
router.register('jurisdictions', api_views.JurisdictionViewSet)
router.register('courts', api_views.CourtViewSet)
router.register('volumes', api_views.VolumeViewSet)
router.register('reporters', api_views.ReporterViewSet)
router.register('bulk', api_views.CaseExportViewSet)
router.register('ngrams', api_views.NgramViewSet, basename='ngrams')
router.register('user_history', api_views.UserHistoryViewSet)
router.register('resolve', api_views.ResolveDocumentViewSet, basename="resolve")

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

No branches or pull requests

1 participant