cdevents / sdk-java

Java SDK for CDEvents
Apache License 2.0
5 stars 6 forks source link

Support for creating Custom Event Types with schemas validation #83

Open rjalander opened 2 months ago

rjalander commented 2 months ago

Changes to add APIs support to create customCDEventAsCloudEvent and customCDEventFromJson also includes the validation of an official custom schema.json

Note: Custom event support as per SDK support Created sample CustomResourceCDEvent.java to test APIs as per example

rjalander commented 1 month ago

Thank you @aalmiray @xibz @afrittoli for reviewing this PR Initially I have created custom CDEvents support using additional APIs customCDEventAsCloudEvent and customCDEventFromJson assuming that various custom events will be created by user of the SDK by extending CDEvent model. But after looking at the approach from go-sdk, generating a base CustomTypeEvent for all the custom event types and using existing APIs to create CloudEvent and Custom events.

Please review the latest changes. Will create a doc example to be inline with go-sdk as per https://github.com/cdevents/sdk-go/tree/main/docs#create-a-custom-cdevent

rjalander commented 1 month ago

@aalmiray @afrittoli could you please review this PR and approve If there are no further comments.