SciCatProject / SciCatProject/backend

Incorrect schema for history

Open
#584 1 comment 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
27
Forks
37
Avg merge
17h 32m
Merged PRs (30d)
38

Description

The schema in the json-explorer claims that Dataset.history is of type #/components/schemas/HistoryClass. In the Swagger explorer, it is shown as

description: | List of objects containing old and new values.

_id* | string default: 3638926a-0f07-4128-99c8-dda3138eadc0Persistent  Identifier for datasets derived from UUIDv4 and prepended automatically  by site specific PID prefix like 20.500.12345/
updatedAt* | string($date-time) default: 1686225387712Time when the update was performed.
updatedBy* | string($date-time) default: 1686225387712Username of the user that performed the update.

When downloading a dataset, the actual field contains a (potentially empty) list. If it is nonempty, the list contains old versions of the dataset instead of the special HistoryClass.

Is this an error in the exported schema or in the API endpoint?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.