docs: add CloudEvents payload examples for evidence.ingested - #10
Merged
Conversation
Adds hand-maintained example payloads under api/events/examples/ to restore the payload examples lost when the asyncapi-gen pipeline replaced the hand-written AsyncAPI spec. Three variants cover the full envelope, required-fields-only, and the optional shardId field. README updated with a Payload Examples section referencing the files. Assisted-by: Claude Opus 4.6 Signed-off-by: Hannah Braswell <hbraswel@redhat.com>
Address review council findings: - Add TestExamplePayloads_ConformToSchema validating all example JSON files deserialize correctly and match CloudEvents const values and required fields from the Go types - Fix README table: 'Full payload with all fields' was inaccurate (missing shardId); relabeled descriptions for accuracy - Replace empty-string SHA-256 digest in minimal example with a realistic synthetic value Assisted-by: Claude Opus 4.6 Signed-off-by: Hannah Braswell <hbraswel@redhat.com>
hbraswelrh
force-pushed
the
docs/payload-examples
branch
from
August 20, 2026 18:14
4c6a1c1 to
5ec8ed0
Compare
hbraswelrh
marked this pull request as ready for review
August 20, 2026 18:17
trevor-vaughan
approved these changes
Aug 20, 2026
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
Adds hand-maintained CloudEvents payload examples under
api/events/examples/to restore the payload examples lost when theasyncapi-genpipeline replaced the hand-written AsyncAPI spec in PR #9.Changes
api/events/examples/evidence-ingested.json— Full envelope with all fields populatedapi/events/examples/evidence-ingested-minimal.json— Required fields only (minimum valid payload)api/events/examples/evidence-ingested-with-shard.json— Demonstrates optionalshardIdpointer fieldREADME.md— Adds Payload Examples subsection under Event TypesContext
PR #9 replaced the hand-written AsyncAPI spec with a generated one. The generator does not yet support
examples:in struct tags, so the four inlineexamplesvalues from the original spec were dropped. These standalone files fill that gap while keeping the generated schemas as the validation source of truth.All example values use realistic formats (valid UUIDs, actual SHA-256 hex strings, RFC 3339 timestamps) so consumers can use them directly for integration testing.
Related Issues