-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingjsonschemaLinkML JSON Schema generator bugLinkML JSON Schema generator bug
Description
LinkML support composition terms like anyOf, allOf, etc.
The following snippet is how I model the security term as a class.
security:
description: >-
A Thing may define abstract security schemes, used to configure the secure access of (a set of) affordance(s).
from_schema: td:definesSecurityScheme
required: true
exactly_one_of:
- range: string
multivalued: true
- range: string
The following JSON Schema is generated from compositions:
"security": {
"description": "A Thing may define abstract security schemes, used to configure the secure access of (a set of) affordance(s).",
"oneOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
],
"type": "string"
}
The outer type in compositions are always translated to the type: "string". Sometimes we want a type Object in there. LinkML support the keyword: Any. But this will allow any object, which is not what we want in the json schema.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingjsonschemaLinkML JSON Schema generator bugLinkML JSON Schema generator bug