Skip to content

[plan] Migrate from unmaintained gojsonschema to santhosh-tekuri/jsonschema #6401

@github-actions

Description

@github-actions

Overview

Consolidate JSON Schema validation by migrating from the unmaintained github.com/xeipuuv/gojsonschema to github.com/santhosh-tekuri/jsonschema/v6, which is already used successfully in the workflow validation code.

Source: Discussion #6400

Background

gh-aw currently uses TWO different JSON Schema libraries:

  • github.com/xeipuuv/gojsonschema (draft-07, unmaintained since 2019) - Used in 1 file
  • github.com/santhosh-tekuri/jsonschema/v6 (draft 2020-12, actively maintained) - Used in 5 files

This creates unnecessary complexity, increases binary size, and introduces security risks.

Benefits

  • 🗑️ Remove unmaintained dependency
  • 🎯 Consistent API across entire codebase
  • 🛡️ Better security posture (actively maintained)
  • 📦 Smaller binary size
  • 🚀 Modern JSON Schema features (draft 2020-12)
  • 🔧 Easier maintenance (one library instead of two)

Planned Tasks

  1. #aw_b1c2d3e4f5a6 - Migrate campaign validation to santhosh-tekuri/jsonschema
  2. #aw_c1d2e3f4a5b6 - Add schema caching for campaign validation
  3. #aw_d1e2f3a4b5c6 - Remove gojsonschema dependency
  4. #aw_e1f2a3b4c5d6 - Update documentation

Risk Assessment

Risk: Very low

  • Only 1 file needs changes (pkg/campaign/validation.go)
  • Excellent test coverage (13 comprehensive tests)
  • Proven alternative already used successfully in workflow validation
  • Estimated effort: 2-3 hours total

AI generated by Plan Command for discussion #6400

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions