fix: collections API should parse skills_json into structured response

Open Beginner friendly
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go
Domain
api, backend

Research direction

Start in internal/store/store.go and internal/handler/collections.go, tracing how skills_json is loaded and serialized for GET /api/v1/collections/{name}. The work is done when the endpoint returns a skills array of structured objects rather than an escaped JSON string, matching the response example.

Written by the indexing model from the issue text.

Description

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

Dominant language
HTML
Stars
9
Forks
3
Avg merge
18m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.

More from redhat-et/skillimage

All issues in redhat-et/skillimage

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.