Skip to content

Serve the requested schema_version's columns from public v2 importmetadata #6172

Description

@rtibbles

Overview

Studio's v2/importmetadata checks that schema_version is between 5 and 6, then always serves the current kolibri_public columns and labels the response with the requested version. A request for schema_version=5 gets v6 columns marked as v5. Kolibri clients will start requesting the version they can read (learningequality/kolibri#15358), so Studio should serve the columns of the requested version, as Kolibri's endpoint does.

Complexity: Medium
Target branch: hotfixes

Context

The Change

For each table, v2/importmetadata should return exactly the columns of the requested schema version, and the latest version when none is requested.

Acceptance Criteria

General

  • For each supported schema_version (5 and 6), every table's rows have exactly the columns of Kolibri's frozen column map for that version.
  • Without schema_version, the response is unchanged from today.
  • An out-of-range or unparseable schema_version returns 400 with the same JSON body as Kolibri, e.g. ["Schema version is too high, exports only suported for versions 5 to 6"], instead of plain text.

Testing

  • Tests cover each supported version.

AI usage

I asked Claude Code to compare Kolibri's and Studio's v2 public content APIs. It found this gap and drafted the sections. I set the scope and reviewed each section.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions