spdx-3-model icon indicating copy to clipboard operation
spdx-3-model copied to clipboard

Updating JSON-LD doc on CreationInfo exception

Open bact opened this issue 3 months ago • 6 comments

There's one TODO at

https://github.com/spdx/spdx-3-model/blob/c68f3e05f0efbec9276919adbd0146ab65c0cb8a/serialization/jsonld.md?plain=1#L36-L41

Update the information or remove the TODO note if the information is already OK.

bact avatar Sep 19 '25 05:09 bact

@JPEWdev - I know we have explicitly allowed CreationInfo - do we now also allow other non-Element nodes?

goneall avatar Sep 19 '25 17:09 goneall

The code generated by shacl2code will inline any node under the following circumstances:

  1. The node has a blank node ID (or no ID, which is the same thing since the code will autoassign blank node IDs to any node missing one)
  2. The node is only referenced from one location
  3. The node is not explicitly added to the SHACLObjectSet by the user

Note that practically speaking, Element derived classes can never be inlined because they aren't allowed to have blank node IDs and thus always fail 1.

JPEWdev avatar Sep 19 '25 18:09 JPEWdev

Btw, we have two places documenting serialization to JSON-LD.

One here in spdx-3-model repo. https://github.com/spdx/spdx-3-model/blob/develop/serialization/jsonld.md

Another at "Model and serialization" chapter in spdx-spec repo. https://github.com/spdx/spdx-spec/blob/develop/docs/serializations.md

Some of their content is overlapping.

bact avatar Sep 19 '25 18:09 bact

Btw, we have two places documenting serialization to JSON-LD.

I wonder if we should consolidate all the serialization information into the spec and remove the serialization folder from this repo. This would avoid any possibility of having conflicting specifications.

goneall avatar Sep 19 '25 19:09 goneall

I wonder if we should consolidate all the serialization information into the spec and remove the serialization folder from this repo. This would avoid any possibility of having conflicting specifications.

Agree.

bact avatar Sep 20 '25 09:09 bact

Created a new issue https://github.com/spdx/spdx-spec/issues/1279 (on spdx-spec repo) for serialization information consolidation

bact avatar Sep 30 '25 20:09 bact