Skip to content

Move any hard coded references to fields in API routes into the models #1177

@ml-evs

Description

@ml-evs

As part of the API refactor (before writing a new version of the API altogether), we should abstract away some of the nasty hardcoded nature of our existing routes. For example, the fields returned when summarising a given item should be annotations on the data model that can be explicitly validated (e.g. a model config that includes a summary_fields attribute). This is crucial for extending the current API to custom data models, and will be the core of the next iteration of the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIFor issues/PRs pertaining to the APIPythonrefactoringFor issues/PRs that refactor existing code/features

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions