Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Confusing documentation of the citation object #2174

@cweider

Description

@cweider

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions