Skip to content

schema/validate: migrate to santhosh-tekuri/jsonschema/v6 - #1327

Open
thaJeztah wants to merge 1 commit into
opencontainers:mainfrom
thaJeztah:migrate_validate
Open

thaJeztah wants to merge 1 commit into
opencontainers:mainfrom
thaJeztah:migrate_validate

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

schema/validate: migrate to santhosh-tekuri/jsonschema/v6

github.com/xeipuuv/gojsonschema is unmaintained; migrate to a
maintained json-schema module.

@thaJeztah thaJeztah mentioned this pull request Oct 12, 2026
@kolyshkin

Copy link
Copy Markdown
Contributor

@thaJeztah please rebase, #1326 is merged now.

@thaJeztah
thaJeztah requested a balanced review from Copilot October 13, 2026 16:54
@thaJeztah
thaJeztah marked this pull request as ready for review October 13, 2026 16:54
@thaJeztah

Copy link
Copy Markdown
Member Author

Thx, saw it; rebased 👍

This comment was marked as outdated.

This comment was marked as outdated.

github.com/xeipuuv/gojsonschema is unmaintained; migrate to a
maintained json-schema module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The migration preserves existing validation behavior and supported schema sources without unresolved issues.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

@AkihiroSuda AkihiroSuda added this to the v1.3.1 milestone Oct 14, 2026
var documentLoader gojsonschema.JSONLoader
schema, err := compiler.Compile(schemaPath)
if err != nil {
fmt.Println(err)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: fmt.Fprintln(os.Stderr, err)

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of nits, overall LGTM

type httpURLLoader struct{}

func (httpURLLoader) Load(url string) (any, error) {
resp, err := http.Get(url)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe add a timeout here? Say

client := &http.Client{Timeout: 30 * time.Second}
resp, err := client.Get(url)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants