Skip to content

Commit

Permalink
fix a couple of deep agent -> entity type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-metalinkage committed Jun 6, 2024
1 parent bac391b commit d096b38
Showing 1 changed file with 139 additions and 92 deletions.
231 changes: 139 additions & 92 deletions _sources/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,29 @@
}
}
},
"EntityType": {
"type": "string",
"enum": [
"Entity",
"Bundle",
"Plan","prov:Entity",
"prov:Bundle",
"prov:Plan"
]
},
"EntityTypes": {
"oneOf": [
{
"$ref": "#/$defs/EntityType"
},
{
"type": "array",
"contains": {
"$ref": "#/$defs/EntityType"
}
}
]
},
"Entity": {
"type": "object",
"properties": {
Expand All @@ -135,7 +158,7 @@
"$ref": "#/$defs/oneOrMoreObjectref"
},
"entityType": {
"$ref": "#/$defs/oneOrMoreObjectref"
"$ref": "#/$defs/EntityTypes"
},
"has_provenance": {
"$ref": "#/$defs/Prov"
Expand All @@ -159,16 +182,13 @@
"$ref": "#/$defs/oneOrMoreEntitiesOrRefIds"
},
"wasInvalidatedBy": {
"$ref": "#/$defs/oneOrMoreAgentsOrRefIds"
"$ref": "#/$defs/oneOrMoreActivitiesOrRefIds"
},
"wasQuotedFrom": {
"$ref": "#/$defs/oneOrMoreAgentsOrRefIds"
"$ref": "#/$defs/oneOrMoreEntitiesOrRefIds"
},
"wasRevisionOf": {
"$ref": "#/$defs/oneOrMoreAgentsOrRefIds"
},
"mentionOf": {
"$ref": "#/$defs/oneOrMoreAgentsOrRefIds"
"$ref": "#/$defs/oneOrMoreEntitiesOrRefIds"
},
"atLocation": {
"$ref": "#/$defs/objectref"
Expand Down Expand Up @@ -279,33 +299,33 @@
{
"properties": {
"provType": {
"oneOf": [
{
"type": "string",
"enum": [
"Entity",
"Bundle",
"Plan"
]
},
{
"type": "array",
"contains": {
"type": "string",
"enum": [
"Entity",
"Bundle",
"Plan"
]
}
}
]
"$comment": "#/$defs/EntityTypes"
}
},
"required": [
"provType"
]
},
{
"properties": {
"prov:type": {
"$comment": "#/$defs/EntityTypes"
}
},
"required": [
"prov:type"
]
},
{
"properties": {
"type": {
"$comment": "#/$defs/EntityTypes"
}
},
"required": [
"type"
]
},
{
"required": [
"featureType"
Expand Down Expand Up @@ -382,32 +402,44 @@
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$"
},
"ActivityTypes": {
"oneOf": [
{
"type": "string",
"enum": [
"Activity",
"prov:Activity"
]
},
{
"type": "array",
"contains": {
"type": "string",
"enum": [
"Activity",
"prov:Activity"
]
},
"items": {
"type": "string"
}
}
]
},
"Activity": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/objectref"
},
"type": {
"oneOf": [
{
"type": "string",
"const": "Activity"
},
{
"type": "array",
"contains": {
"type": "string",
"const": "Activity"
},
"items": {
"type": "string"
}
}
]
"$ref": "#/$defs/ActivityTypes"
},
"activityType": {
"$ref": "#/$defs/oneOrMoreObjectref"
"$ref": "#/$defs/ActivityTypes"
},
"prov:type": {
"$ref": "#/$defs/ActivityTypes"
},
"endedAtTime": {
"$ref": "#/$defs/dateTime"
Expand Down Expand Up @@ -532,6 +564,16 @@
"activityType"
]
},
{
"required": [
"prov:type"
]
},
{
"required": [
"type"
]
},
{
"required": [
"used"
Expand All @@ -556,11 +598,6 @@
"required": [
"wasAssociatedWith"
]
},
{
"required": [
"type"
]
}
],
"allOf": [
Expand All @@ -569,6 +606,38 @@
}
]
},
"AgentTypes": {
"type": "string",
"enum": [
"Agent",
"Organization",
"Person",
"SoftwareAgent",
"SoftwareDescription",
"DirectQueryService",
"prov:Agent",
"prov:Organization",
"prov:Person",
"prov:SoftwareAgent",
"prov:SoftwareDescription",
"prov:DirectQueryService"
]
},
"AgentType": {
"oneOf": [
{
"$ref": "#/$defs/AgentTypes"
},
{
"type": "array",
"items": {
"contains": {
"$ref": "#/$defs/AgentTypes"
}
}
}
]
},
"Agent": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -618,45 +687,31 @@
{
"properties": {
"provType": {
"oneOf": [
{
"type": "string",
"enum": [
"Agent",
"Organization",
"Person",
"SoftwareAgent",
"SoftwareDescription",
"DirectQueryService"
]
},
{
"type": "array",
"contains": {
"type": "string",
"enum": [
"Agent",
"Organization",
"Person",
"SoftwareAgent",
"SoftwareDescription",
"DirectQueryService"
]
},
"items": {
"type": "string"
}
}
]
"$ref": "#/$defs/AgentType"
}
},
"required": [
"provType"
]
},
{
"properties": {
"type": {
"$ref": "#/$defs/AgentType"
}
},
"required": [
"agentType"
"type"
]
},
{
"properties": {
"prov:type": {
"$ref": "#/$defs/AgentType"
}
},
"required": [
"prov:type"
]
},
{
Expand All @@ -681,13 +736,13 @@
"oneOf": [
{
"type": "string",
"const": "Usage"
"enum": ["prov:Usage","Usage" ]
},
{
"type": "array",
"contains": {
"type": "string",
"const": "Usage"
"enum": ["prov:Usage","Usage" ]
},
"items": {
"type": "string"
Expand All @@ -699,18 +754,10 @@
"$ref": "#/$defs/dateTime"
},
"entity": {
"oneOf": [
{
"$ref": "#/$defs/objectref"
},
{
"$ref": "#/$defs/Entity"
}
]
"$ref": "#/$defs/oneOrMoreEntitiesOrRefIds"
}
},
"required": [
"atTime",
"entity"
]
},
Expand Down

0 comments on commit d096b38

Please sign in to comment.