@@ -116,6 +116,24 @@
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"io": {
|
||||
"type": "object",
|
||||
"required": ["accepts", "produces"],
|
||||
"properties": {
|
||||
"accepts": { "$ref": "#/$defs/formats" },
|
||||
"produces": { "$ref": "#/$defs/formats" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"required": ["required", "optional"],
|
||||
"properties": {
|
||||
"required": { "$ref": "#/$defs/identifierList" },
|
||||
"optional": { "$ref": "#/$defs/identifierList" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"required": ["repository", "license"],
|
||||
@@ -157,6 +175,60 @@
|
||||
"uniqueItems": true
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"required": ["requirements", "capabilities"],
|
||||
"properties": {
|
||||
"requirements": {
|
||||
"type": "object",
|
||||
"required": ["workers"],
|
||||
"properties": { "workers": { "const": true } }
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"required": ["required"],
|
||||
"properties": {
|
||||
"required": {
|
||||
"type": "array",
|
||||
"contains": { "const": "workers" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"required": ["capabilities"],
|
||||
"properties": {
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"required": ["required"],
|
||||
"properties": {
|
||||
"required": {
|
||||
"type": "array",
|
||||
"contains": { "const": "workers" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"requirements": {
|
||||
"type": "object",
|
||||
"required": ["workers"],
|
||||
"properties": { "workers": { "const": true } }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"$defs": {
|
||||
"urlReference": {
|
||||
"type": "string",
|
||||
@@ -218,6 +290,37 @@
|
||||
"items": {
|
||||
"$ref": "#/$defs/nonEmptyString"
|
||||
}
|
||||
},
|
||||
"identifierList": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$"
|
||||
}
|
||||
},
|
||||
"formats": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["mediaType", "extensions"],
|
||||
"properties": {
|
||||
"mediaType": {
|
||||
"type": "string",
|
||||
"pattern": "^(?:\\*|[A-Za-z0-9!#$&^_.+-]+)/(?:\\*|[A-Za-z0-9!#$&^_.+-]+)$"
|
||||
},
|
||||
"extensions": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^\\.[A-Za-z0-9][A-Za-z0-9._+-]*$"
|
||||
}
|
||||
},
|
||||
"label": { "$ref": "#/$defs/nonEmptyString" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
|
||||
Reference in New Issue
Block a user