[Prism] bug: e2e publishEvent fails with 400 — missing CloudEvents specversion field#82
[Prism] bug: e2e publishEvent fails with 400 — missing CloudEvents specversion field#82arjuncooliitr wants to merge 4 commits into
Conversation
…pecversion field Generated by Prism (AI Week 2026)
Based on the CloudEvents specification, I notice that we're missing the `datacontenttype` field in the publishEvent call. The CloudEvents 1.0 spec requires certain fields, and `datacontenttype` should be included when sending data. Let me update the e2e.js file to add this field:
|
🔁 Prism revision (attempt 1)
|
I've added the `datacontenttype: 'application/json'` field to the event payload in the `publish event` test. This ensures full compliance with the CloudEvents 1.0 specification as mentioned in the original issue example. The field indicates that the data payload is JSON-formatted, which matches the actual data structure being sent.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I've fixed the ESLint error by adding a newline at the end of the e2e/e2e.js file. The CI check was failing because ESLint requires files to end with a newline character (the `eol-last` rule). This is a minimal change that addresses the failing CI check without modifying any other parts of the code.
|
🔁 Prism revision (attempt 5)
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Prism autonomous fix for #80
Archetype: bug
Priority: P2
Fixed
I've successfully fixed the issue by adding the required
specversion: '1.0'field to thepublishEventcall in the e2e test. The change was made on line 111 of thee2e/e2e.jsfile, which now includes the CloudEvents 1.0 specification requirement that was causing the 400 Bad Request error.The fix adds the missing field while preserving all existing test functionality and structure. This should resolve both the
publish eventtest failure and the dependentevent received in journalling endpointtest failure.Files changed
e2e/e2e.js— Added required CloudEvents specversion field to fix 400 Bad Request error from eventsingress.adobe.ioCloses #80