slots:
see_also:
range: uriorcurie
description: Links to useful info
multivalued: true
inlined_as_list: true
When JsonSchemaGenerator switched from using SchemaLoader to SchemaView it introduced a call to SchemaView.is_inlined(). Currently that method will return True for the above slot definition. Regardless of whether you should put inlined_as_list on a slot with a type range (as opposed to a class range), that feels like the wrong answer to me (I can already hear @cmungall saying "Postel-ian"). A uriorcurie can't really be inlined because there's nothing to inline, right?
The change here swaps the order of some logical checks in is_inlined so that the inlined and inlined_as_list metaslots are only checked if the range is a class in the schema. I added a test that attempts to enumerate all the possibilities.
The root cause of https://github.com/linkml/linkml/issues/1266 is that the schema includes a slot defined like so:
When
JsonSchemaGenerator
switched from usingSchemaLoader
toSchemaView
it introduced a call toSchemaView.is_inlined()
. Currently that method will returnTrue
for the above slot definition. Regardless of whether you should putinlined_as_list
on a slot with a type range (as opposed to a class range), that feels like the wrong answer to me (I can already hear @cmungall saying "Postel-ian"). Auriorcurie
can't really be inlined because there's nothing to inline, right?The change here swaps the order of some logical checks in
is_inlined
so that theinlined
andinlined_as_list
metaslots are only checked if the range is a class in the schema. I added a test that attempts to enumerate all the possibilities.Fixes https://github.com/linkml/linkml/issues/1266