First implementation (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
1 parent
34c0abb26a
commit
4fa326dc76
534 files changed
+28280
-37
No files matched your search
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://paperspec.scient.ing/schemas/backend.schema.json",
|
||||
"title": "Backend declaration",
|
||||
"description": "scienting-backend/1: a tool's code and weight licenses and their conditions; spec/14-rights.md.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"format": {
|
||||
"const": "scienting-backend/1"
|
||||
},
|
||||
"name": {
|
||||
"$ref": "common.schema.json#/$defs/key"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"stage": {
|
||||
"enum": [
|
||||
"read",
|
||||
"review",
|
||||
"gloss",
|
||||
"embed",
|
||||
"digitize",
|
||||
"other"
|
||||
]
|
||||
},
|
||||
"processor": {
|
||||
"$ref": "common.schema.json#/$defs/processor"
|
||||
},
|
||||
"code_license": {
|
||||
"$ref": "common.schema.json#/$defs/license"
|
||||
},
|
||||
"weights": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"license": {
|
||||
"$ref": "common.schema.json#/$defs/license"
|
||||
},
|
||||
"url": {
|
||||
"$ref": "common.schema.json#/$defs/url"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"license"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"conditions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "common.schema.json#/$defs/key"
|
||||
},
|
||||
"kind": {
|
||||
"enum": [
|
||||
"revenue-cap",
|
||||
"no-competition",
|
||||
"purpose"
|
||||
]
|
||||
},
|
||||
"usd": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"vendor": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"allowed": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"enum": [
|
||||
"research",
|
||||
"personal",
|
||||
"education",
|
||||
"startup",
|
||||
"commercial"
|
||||
]
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"source": {
|
||||
"$ref": "common.schema.json#/$defs/url"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "revenue-cap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"usd"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "no-competition"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"vendor"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "purpose"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"allowed"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"format",
|
||||
"name",
|
||||
"version",
|
||||
"stage",
|
||||
"processor",
|
||||
"code_license",
|
||||
"weights",
|
||||
"conditions"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in new issue
Block a user