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

How to integrate custom schemaUri for SDKs #236

Open
rjalander opened this issue May 30, 2024 · 1 comment
Open

How to integrate custom schemaUri for SDKs #236

rjalander opened this issue May 30, 2024 · 1 comment
Assignees

Comments

@rjalander
Copy link

The schemaUri defined in latest spec 0.4.0, needs to be integrated with SDKs

"schemaUri": {
    "type": "string",
    "minLength": 1,
    "format": "uri"
}
@rjalander rjalander changed the title Instructions on how to use custom schemaUri for SDKs How to integrate custom schemaUri for SDKs May 31, 2024
@afrittoli afrittoli self-assigned this Jul 22, 2024
@afrittoli
Copy link
Contributor

This PR shall provide some guidance about this issue: cdevents/sdk-go#87.

The SDK shall be able to validate events against the provided schemaUri, with the following notes:

  • validation on the CDEvents schema must be verified first
  • the SDK MUST provide an API for users to load the schema from a string or []byte and associated it with the schemaUri, so that lookup of the schema is done in memory rather than over the internet
  • the SDK MAY provide an option to attempt and download the schema from the schemaUri directly via HTTPS
  • the SDK MUST fail validation if HTTPS download is not available/disabled and the schema is not in memory

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