Add support for structured validation report#23
Merged
stefanprodan merged 2 commits intomainfrom Apr 25, 2026
Merged
Conversation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
e3dff8c to
e850223
Compare
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
e850223 to
0da4831
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
flux-schema validatecommand can now emit a structured report of the validation results by setting--outputtojsonoryaml. The envelope shape is versioned and documented by the JSON Schema.Envelope
Every report is wrapped in a top-level envelope:
version"1.0.0".$schemareport.reporterflux-schema/0.1.0.report.timestampreport.summarytotal,valid,invalid,skipped.report.results[]Result fields
resource{apiVersion, kind, namespace?, name?}ornullwhen no Kubernetes identity could be recovered (e.g. a file that fails to open, or stdin that is not YAML).source(stdin).idx0for source-level failures that have no document.status"valid","invalid", or"skipped".reasonstatusis"valid".violations[]{path?, message}entries.pathis a JSON Pointer set by schema violations; for every other reason it is absent andmessagecarries the raw error text.Reason enum
--skip-missing-schemas)source-load-errorinvalid/invalidyaml-parse-errorinvalid/invalidschema-load-errorinvalid/invalidschema-not-foundinvalid/skippedschema-violationviolations[]carries a JSON Pointerpathper entry.invalid/invalidkind-skipped--skip-kindpattern.skipped/skipped