Project

Profile

Help

Task #5198

closed

Move CollectionVersion.metadata JSON field to be top-level fieldson the Model

Added by bmbouter over 4 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 57
Quarter:

Description

Problem

'metadata' contains data that isn't being exposed in the bindings directly. Here's an example of 'metadata' data:

"metadata": {
    "namespace": "my_namespace", 
    "name": "my_collection", 
    "version": "1.2.0", 
    "description": "A collection that performs...",
    "license": [
      "MIT",
    ],
    "authors": [
      "John Smith <jsmith@example.com>",
    ],
    "readme": "README.md",
    "tags": [
      "deployment",
    ],
    "dependencies": {},
    "documentation": null,
    "license_file": null,
    "issues": null,
    "homepage": null,
    "repository": null,
  },

Solution

Make each it's own field. Use ArrayField, CharField, TextField. Also use some ForeignKey modeling for 'dependencies' and 'tags'. Tags needs to become its own Model and it will needs its own Viewset also. This allows for filter searching on the current known Tags through that viewset.

Also available in: Atom PDF