Open xibz opened 8 months ago
Subject classes for build events do not have a proper parent.
For example https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/queued/Subject.java#L21 and https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java are very similar. These classes should have a parent class that handles the intersection between all subject object in all events. As in the type, id, source, etc. These should all live on a parent. This is an issue in various other places. I imagine Context has the same problem. We should definitely change how this behaves and how these classes are generated
type
id
source
Context
Likely related to the current source generator based on jsonschema2pojo. Unfortunately the plugin's documentation does not mention a setting for handling this use case.
jsonschema2pojo
Subject classes for build events do not have a proper parent.
For example https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/queued/Subject.java#L21 and https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java are very similar. These classes should have a parent class that handles the intersection between all subject object in all events. As in the
type
,id
,source
, etc. These should all live on a parent. This is an issue in various other places. I imagineContext
has the same problem. We should definitely change how this behaves and how these classes are generated