redhat-et / redhat-et/skillimage

feat: add JSON Schema for SkillCollection YAML

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

SkillCard has a JSON Schema at schemas/skillcard.schema.json
that powers skillctl validate and enables IDE autocompletion.
SkillCollection YAML has no equivalent schema — there's no
validation beyond Go struct unmarshaling.

Proposed solution

Add schemas/skillcollection.schema.json covering:

  • apiVersion (required, must be skillimage.io/v1alpha1)
  • kind (required, must be SkillCollection)
  • metadata.name, metadata.version, metadata.description
  • skills[] entries with ref (and source once #35 lands)

Extend skillctl validate to detect collection files
(by kind: SkillCollection) and validate against the
collection schema.

Motivation

  • Consistency with SkillCard validation
  • Catch typos and missing fields early
  • IDE autocompletion for collection authors
  • Required foundation for #35 (Git source URLs in collections)

References

  • Existing schema: schemas/skillcard.schema.json
  • Collection implementation: pkg/collection/

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.

Research direction

Compare schemas/skillcard.schema.json with the collection implementation in pkg/collection/ and inspect the existing skillctl validate entry point. Define schemas/skillcollection.schema.json for the listed fields, including skills entries, then extend validation to recognize kind: SkillCollection and validate it; account for source once #35 lands.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, json
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.