This is a spin-off issue from #302 which discusses 2 issues focused on how to support Extension subclasses.
According to the SPDX AIPackage specification an optional property field is extension. This field is of type Extension.
Extension is an abstract class so it can't be instantiated.
Referencing an Extension in the JSON-LD without parameters passes the Java coded validation but fails the JSON schema validation (see related spdx/spdx-3-model#1017):
"extension" : [
{
"type" : "extension_Extension"
}
]
Adding a parameter:
"extension" : [
{
"type" : "extension_Extension",
"randomProperty" : "test"
}
]
causes the Java parser to fail with Analysis exception processing SPDX file: No property descriptor for field randomProperty.
Adding any additional type will also cause the Java code to fail.
Is there an approach where we can allow Extensions in the Java library?
This is a spin-off issue from #302 which discusses 2 issues focused on how to support Extension subclasses.
According to the SPDX AIPackage specification an optional property field is
extension. This field is of typeExtension.Extensionis an abstract class so it can't be instantiated.Referencing an
Extensionin the JSON-LD without parameters passes the Java coded validation but fails the JSON schema validation (see related spdx/spdx-3-model#1017):Adding a parameter:
causes the Java parser to fail with
Analysis exception processing SPDX file: No property descriptor for field randomProperty.Adding any additional
typewill also cause the Java code to fail.Is there an approach where we can allow
Extensionsin the Java library?