Skip to content

docs: add CloudEvents payload examples for evidence.ingested - #10

Merged
hbraswelrh merged 2 commits into
complytime:mainfrom
hbraswelrh:docs/payload-examples
Aug 20, 2026
Merged

docs: add CloudEvents payload examples for evidence.ingested#10
hbraswelrh merged 2 commits into
complytime:mainfrom
hbraswelrh:docs/payload-examples

Conversation

@hbraswelrh

@hbraswelrh hbraswelrh commented Aug 20, 2026

Copy link
Copy Markdown
Member
  • 🦾 This PR includes content assisted by an LLM (Claude Opus 4.6)
  • 💪 This PR was reviewed by a human prior to submission

Summary

Adds hand-maintained CloudEvents payload examples under api/events/examples/ to restore the payload examples lost when the asyncapi-gen pipeline replaced the hand-written AsyncAPI spec in PR #9.

Changes

  • api/events/examples/evidence-ingested.json — Full envelope with all fields populated
  • api/events/examples/evidence-ingested-minimal.json — Required fields only (minimum valid payload)
  • api/events/examples/evidence-ingested-with-shard.json — Demonstrates optional shardId pointer field
  • README.md — Adds Payload Examples subsection under Event Types

Context

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 inline examples values 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

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
hbraswelrh force-pushed the docs/payload-examples branch from 4c6a1c1 to 5ec8ed0 Compare August 20, 2026 18:14
@hbraswelrh
hbraswelrh marked this pull request as ready for review August 20, 2026 18:17
@hbraswelrh
hbraswelrh merged commit 1ded66d into complytime:main Aug 20, 2026
13 checks passed
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.

3 participants