Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
347 changes: 304 additions & 43 deletions src/osw/core.py

Large diffs are not rendered by default.

568 changes: 568 additions & 0 deletions tests/fixtures/category_template_selection/after-form-editor-save.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"label": [
{
"text": "Category (Class)",
"lang": "en"
}
],
"uuid": "89aafe6d-ae5a-4f29-97ff-df7736d4cab6",
"description": [
{
"text": "Meta-Category for Categories",
"lang": "en"
}
],
"name": "CategoryClass",
"type": [
"Category:Category"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"@context": [
{
"exact_ontology_match***": {
"@id": "owl:equivalentClass",
"@type": "@id"
},
"subclass_of": {
"@id": "rdfs:subClassOf",
"@type": "@id"
},
"subclass_of*": {
"@id": "Property:SubClassOf",
"@type": "@id"
},
"version": "owl:versionInfo",
"version*": "Property:HasVersion",
"utf8_icon": "Property:HasUtf8Icon"
},
"/wiki/Category:OSWffe74f291d354037b318c422591c5023?action=raw&slot=jsonschema"
],
"allOf": [
{
"$ref": "/wiki/Category:OSWffe74f291d354037b318c422591c5023?action=raw&slot=jsonschema"
}
],
"uuid": "89aafe6d-ae5a-4f29-97ff-df7736d4cab6",
"type": "object",
"title": "Category",
"title*": {
"de": "Kategorie (Klasse)",
"en": "Category (Class)"
},
"required": [
"subclass_of",
"type"
],
"defaultProperties": [
"version"
],
"properties": {
"type": {
"items": {
"subclassof_range": "Category:Category",
"format": "autocomplete",
"options": {
"autocomplete": {
"$comment": "All categories here since subclassof_range is limited by depth 5",
"query": "[[:Category:%2B]]"
}
}
},
"default": [
"Category:Category"
],
"options": {
"hidden": true
}
},
"version": {
"title": "Version",
"title*": {
"de": "Version"
},
"description": "Human-readable version string (e.g. 1.0.1) following https://semver.org/",
"description*": {
"de": "Für Menschen lesbare Versionszeichenfolge (z.B. 1.0.1) gemäß https://semver.org/"
},
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"propertyOrder": -1010,
"default": "0.1.0"
},
"subclass_of": {
"title": "Supercategories",
"title*": {
"de": "Überkategorien"
},
"type": "array",
"propertyOrder": -1009,
"items": {
"title": "Category",
"title*": {
"de": "Kategorie"
},
"type": "string",
"format": "autocomplete",
"subclassof_range": "Category:Entity"
},
"default": [
"Category:Entity"
],
"options": {
"hidden": false
}
},
"utf8_icon": {
"type": "array",
"title": "UTF8-Icons",
"title*": {
"de": "UTF8-Symbole"
},
"description": "see https://www.unicode.org/cldr/charts/latest/annotations/romance.html",
"description*": {
"de": "siehe https://www.unicode.org/cldr/charts/latest/annotations/germanic.html"
},
"items": {
"type": "string",
"title": "UTF8-Icon",
"minLength": 1,
"maxLength": 2
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"@context": [
{{#each subclass_of}}
"/wiki/{{{.}}}?action=raw\u0026slot=jsonschema"{{#unless @last}},{{/unless}}
{{/each}}
],
"allOf": [
{{#if subclass_of}}{{#each subclass_of}}
{"$ref": "/wiki/{{{.}}}?action=raw\u0026slot=jsonschema"}{{#unless @last}},{{/unless}}
{{/each}}{{else}}
{}
{{/if}}
],
"type": "object",
"uuid": "{{{uuid}}}",
{{#if version}}"x-oold-version": "{{{version}}}",{{/if}}
"title": "{{{name}}}",
"title*": {
{{#each label}}
"{{{lang}}}": "{{{text}}}"{{#unless @last}},{{/unless}}
{{/each}}
},
"description": "{{{description.[0].text}}}",
"description*": {
{{#each description}}
"{{{lang}}}": "{{{text}}}"{{#unless @last}},{{/unless}}
{{/each}}
},
"required": [
"type"
],
"properties": {
"type": {
"default": ["{{{_page_title}}}"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"subclass_of": [
"Category:Entity"
],
"type": [
"Category:Category"
],
"uuid": "ffe74f29-1d35-4037-b318-c422591c5023",
"label": [
{
"text": "Characteristic Type",
"lang": "en"
},
{
"text": "Charakteristik-Typ",
"lang": "de"
}
],
"description": [
{
"text": "A set of properties intended to be used in other characteristic types or classes",
"lang": "en"
},
{
"text": "Ein Satz von Eigenschaften zur Nutzung in anderen Charakteristik-Typen oder Klassen",
"lang": "de"
}
],
"name": "CharacteristicType"
}
Loading
Loading