cdevents / sdk-java

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

Generate SDK with spec release v0.4.1 #82

Closed rjalander closed 2 months ago

rjalander commented 3 months ago

This PR includes the changes to update the SDK as per new spec release 0.4.1

aalmiray commented 3 months ago

Why is the schema preprocessor step needed now?

rjalander commented 3 months ago

Why is the schema preprocessor step needed now?

PreprocessSchemas step is actually needed to updated the schema's ref URL to include .json extension for all the spec schemas from "$ref": "links/embeddedlinksarray" to "$ref": "links/embeddedlinksarray.json"

As per the schema definition the $ref URL is resolved with the baseURI of ``"$id": "https://cdevents.dev/0.4.1/schema/artifact-deleted-event" which is https://cdevents.dev/0.4.1/schema/links/embeddedlinksarray But the same "$ref" does not work when creating pojo classes as it is referring to schemas in classpath which is with .json extension https://github.com/cdevents/spec/blob/v0.4.1/schemas/links/embeddedlinksarray.json

Note: https://github.com/cdevents/spec/pull/220#discussion_r1596805192

rjalander commented 2 months ago

@afrittoli Can you please review and approve this PR.

rjalander commented 2 months ago

@afrittoli, could you please merge this PR if everything looks good?

afrittoli commented 2 months ago

@rjalander sure, will do, but also you don't have to wait for me to merge the PR - I have admin rights for the whole org but I'm not actually a maintainer of the Java SDK 🙏