feat: validate action#116
Draft
reuvenharrison wants to merge 1 commit into
Draft
Conversation
Per-finding PR annotations via --format githubactions, plus a notice with a free review-page link when findings are reported. Mirrors the shape of the breaking action: text run for findings count + step output, githubactions run for the annotations, fail-on-finding toggle defaulting to true. allow-external-refs defaults to true (matches oasdiff's binary default); set to false when validating untrusted specs to prevent SSRF. Outputs `findings` (numeric) so downstream steps can branch on it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Holding this PR until oasdiff v1.16.0 ships with the new |
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.
Summary
validate/action that runsoasdiff validateagainst an OpenAPI spec and emits per-finding PR annotations via--format githubactions.findings(numeric count) so downstream steps can branch on it.::notice::annotation plus aGITHUB_STEP_SUMMARYlink to the free review surface on oasdiff.com, mirroring the breaking action.fail-on-findingtoggle (defaulttrue) lets callers run in visibility-only mode without failing CI.allow-external-refstoggle (defaulttrue, matching oasdiff's binary default); set tofalsewhen validating untrusted specs to prevent SSRF.Test plan
info.version, expect 1 finding annotation oninfo:at the correct line, exit 1.fail-on-finding: falseon a spec with findings, expect annotations + step summary link, exit 0.allow-external-refs: falseon a spec with an external$ref, expect a finding annotation.outputs.findingsis the numeric count and downstreamif: steps.x.outputs.findings == '0'works.🤖 Generated with Claude Code