Skip to content

fix: collections API should parse skills_json into structured response #18

@pavelanni

Description

@pavelanni

From code review of PR #15.

GET /api/v1/collections/{name} returns skills_json as a JSON-encoded string inside JSON, which is awkward for API consumers:

{"skills_json": "[{\"name\":\"s1\",\"image\":\"quay.io/org/s1:1.0.0\"}]"}

Should return parsed structure:

{"skills": [{"name": "s1", "image": "quay.io/org/s1:1.0.0"}]}

Options:

  • Add a Skills []SkillRef field to Collection with custom MarshalJSON
  • Or use a response DTO that parses skills_json before serialization

Files: internal/store/store.go, internal/handler/collections.go

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