mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
fix JsonObj bug https://github.com/linkml/linkml/issues/1665
This commit is contained in:
parent
d4493146b5
commit
38d83f3279
3 changed files with 5 additions and 4 deletions
|
@ -97,10 +97,10 @@ class NamespacesAdapter(Adapter):
|
|||
|
||||
# add in monkeypatch nwb types
|
||||
nwb_lang = copy(NwbLangSchema)
|
||||
nwb_lang.annotations = {
|
||||
nwb_lang.annotations.update({
|
||||
'is_namespace': Annotation(tag='is_namespace', value= 'False'),
|
||||
'namespace': Annotation(tag='namespace', value= ns.name)
|
||||
}
|
||||
})
|
||||
lang_schema_name = '.'.join([ns.name, 'nwb.language'])
|
||||
nwb_lang.name = lang_schema_name
|
||||
sch_result.schemas.append(nwb_lang)
|
||||
|
|
|
@ -67,6 +67,7 @@ NwbLangSchema = SchemaDefinition(
|
|||
classes=[Arraylike, AnyType],
|
||||
types=DTypeTypes,
|
||||
imports=['linkml:types'],
|
||||
prefixes={'linkml': Prefix('linkml','https://w3id.org/linkml')}
|
||||
prefixes={'linkml': Prefix('linkml','https://w3id.org/linkml')},
|
||||
annotations=[{'tag': 'is_namespace', 'value': False}, {'tag': 'namespace', 'value': ''}]
|
||||
)
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ class LinkMLProvider(Provider):
|
|||
# write schemas to yaml files
|
||||
build_result = {}
|
||||
|
||||
namespace_sch = [sch for sch in built.schemas if sch.annotations.get('is_namespace', False) and sch.annotations['is_namespace'].value == 'True']
|
||||
namespace_sch = [sch for sch in built.schemas if 'is_namespace' in sch.annotations and sch.annotations['is_namespace'].value == 'True']
|
||||
for ns_linkml in namespace_sch:
|
||||
version = ns_adapter.versions[ns_linkml.name]
|
||||
version_path = self.namespace_path(ns_linkml.name, version, allow_repo=False)
|
||||
|
|
Loading…
Reference in a new issue