Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom validation for context attributes in wrapper library #592

Open
touchkey opened this issue Sep 27, 2023 · 1 comment
Open

Custom validation for context attributes in wrapper library #592

touchkey opened this issue Sep 27, 2023 · 1 comment

Comments

@touchkey
Copy link
Contributor

Hi Team,

What is the way to add a custom validation for cloudevents?
My requirement - I want to add some mandatory validation w.r.t our organization and keep this in our cloudevents wrapper library. This wrapper library will be used by hundreds of customer. By adding this in our library we are avoiding each validation to be added by each customer. Basically, we want to generalize the validation in wrapper library according to our organization need.

Let's say I want to check whether some context attributes added or not from our organization perspective?
I see that build method in CloudEventBuilder class has mandatory validation for source, type and id(link). Similarly I want to check this for context attributes when we call build method. Pls suggest if there is any other good way other than this.

Regards

@pierDipi
Copy link
Member

Hi @touchkey, currently, there isn't a native way of adding additional validations

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

No branches or pull requests

2 participants