Use --include-range-class-descendants
flag in JSON Schema generator calls
#2083
+55
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes are related to the issues uncovered while trying to integrate
[email protected]
intonmdc-runtime
(microbiomedata/nmdc-runtime#560)The immediate cause of the problem was that the
WorkflowExecutionActivity
class became abstract while still being used as therange
of theactivity_set
slot. This isn't necessarily wrong from a modeling perspective, but it does cause some confusing in LinkML's JSON Schema generator. The generator is more equipped to handle this situation when the--include-range-class-descendants
flag is used. This flag instructs the generator to do more work in flattening out the class hierarchy in defined in the LinkML schema when going to the JSON Schema representation (which has no concept of class hierarchy). Arguably this should be the default for the JSON Schema generator, but I need to work that out on the LinkML side.These changes also add a new unit test that make sure that both JSON Schema artifacts generated from the schema are compatible with the
fastjsonschema
library thatnmdc-runtime
uses. This will give us an earlier failure if something similar crops up again.