Skip to content

Conversation

@AustinAbro321
Copy link
Member

@AustinAbro321 AustinAbro321 commented Nov 20, 2025

Description

This deletes the hack/schema folder and instead directly embeds the schema within Zarf. This makes it easier for SDK users to consume as they will no longer have to set lint.ZarfSchema, it's now automatically embedded for them.

Important to note that this creates a file called src/pkg/schema/zarf-v1alpha1-schema.json, and keeps the existing zarf-schema.json at the root of the repo. We refer to the root zarf-schema.json in our docs and many users use it for IDE integration. Likely in the future this generate code will generate each individual schema, and the zarf-schema.json will be a schema file that works with every schema, in accordance with zarf-dev/proposals#49.

Breaking change as lint.ZarfSchema is deleted, but the fix is very simple, you can just delete it.

Related Issue

Fixes #4384

Checklist before merging

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 058f960
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/6930463268fab400085016b9

Signed-off-by: Austin Abro <[email protected]>
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/schema/schema.go 0.00% 2 Missing ⚠️
src/pkg/lint/schema.go 50.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
main.go 0.00% <ø> (ø)
src/pkg/lint/schema.go 60.00% <50.00%> (+4.73%) ⬆️
src/pkg/schema/schema.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 marked this pull request as ready for review November 20, 2025 20:10
@AustinAbro321 AustinAbro321 requested review from a team as code owners November 20, 2025 20:10
@AustinAbro321 AustinAbro321 moved this to PR Review in Zarf Nov 20, 2025
@AustinAbro321 AustinAbro321 changed the title refactor!: create schema package to generate and embed the schema directly in Zarf refactor!: generate schema within Zarf Nov 20, 2025
Signed-off-by: Austin Abro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: PR Review

Development

Successfully merging this pull request may close these issues.

Generate schema within Zarf rather than using go:embed

2 participants