question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Harmonize validation of CloudEvents

See original GitHub issue

Is your feature request related to a problem? Please describe. My problem is related to the validation of extensions. While new CloudEvent() rightfully rejects an extension named my-extension (problem being the -) it is perfectly okay for HTTP.toEvent() and even to ce.validate().

Describe the solution you would like to see I think the creation of a CE should always have the same validations in place, no matter if its created by new CloudEvent() or via HTTP.toEvent(). I also think the validate() method should consider extensions.

Additional context I transport my CEs via HTTP and therefore have a service that takes an HTTP request with HTTP.toEvent(), validates the CE with ce.validate() and then puts it in my event broker. On the consuming side there is a service that takes the event from the broker, creates a new CloudEvent with new CloudEvent() and sends it via axios using the HTTP.binary() function.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
manuelottlikcommented, Dec 9, 2022

Hey @lance, sorry for the long wait. I was able to validate your code – not sure what I did wrong there in the past, it is working as expected. Sorry!

1reaction
manuelottlikcommented, Sep 20, 2022

Hey @lance, I am currently traveling, I am not sure when I will be able trying to reproduce this, sorry. But will definitely do!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module event/validation - CloudEvents
Documentation for cloudevents.
Read more >
CloudEvents - Intro, Deep-Dive a... Doug Davis, Clemens ...
Join us for Kubernetes Forums Seoul, Sydney, Bengaluru and Delhi - learn more at kubecon.io Don't miss KubeCon + CloudNativeCon 2020 events ...
Read more >
Transforming and harmonizing healthcare data for BigQuery
To harmonize data, you need to validate data sources and then build a ... Google Cloud provides the following ways to validate source...
Read more >
CloudEvents SDK - Meeting Minutes - Google Docs
Java SDK: https://github.com/cloudevents/sdk-java ... Doug: open an issue or PR for SDK.md to RECOMMEND/SHOULD do attribute validation - Done ...
Read more >
New CloudEvents validation service - Joinup.eu
The Test Bed has now made available a new service to validate JSON content against the CloudEvents specification.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found