lib/schema/moboFieldAdditions.schema.yaml
---
title: Mobo Fields
properties:
####################################################
# JSON Schema annotations #
####################################################
items:
description: |
Some fields have multiple values (e.g. comma seperated).<br>
In this case the items property needs to be used.<br>
The items object then defines the actual data type, format and form
example:
- |
title: Tags
items:
type: string
format:
type: string
enum:
- date
- date-time
- url
- email
- tel
- Page
- page
- Code
- code
- geographic coordinate
- Geographic coordinate
- Quantity
- quantity
- Record
- record
- Temperature
- temperature
specific: domain
important: true
appliesNot:
- model
- form
description: |
Describes the semantic format (how to interpret the type).
E.g. 'email' or SMW specific datatypes like 'Temperature'
example:
- |
type: string
format: email
####################################################
# Domain Specific #
####################################################
form:
type:
- string
- array
specific: domain
important: true
appliesNot:
- model
- form
description: |
Defines which form should be automatically used if the red link is clicked.
It can link to one multiple forms.<br>
When form it used, it implies: `type: string` and `format: Page`
example:
- |
form: formName
- |
form:
- formName1
- formName2
deprecated:
type: boolean
default: false
specific: domain
appliesNot:
- model
- form
description: |
If true, the field will be marked as deprecated.
It will not be displayed in forms, but the template will keep it in order to display old entries.
example:
- |
deprecated: true
showPage:
type: boolean
default: true
specific: domain
appliesNot:
- form
description: |
Whether to display this element in the page view.
example:
- |
showPage: false
showForm:
type: boolean
default: true
specific: domain
important: true
appliesNot:
- form
description: |
Whether to display this element in the form-edit view.
example:
- |
showForm: false
####################################################
# Platform Specific #
####################################################
smw_type:
type: string
internal: true
appliesNot:
- model
- form
description: |
The final SMW Type of the field. <br>
Avoid to set this manually - use the domain specific "type" and "format" instead, if possible.
smw_property:
type: boolean
default: true
specific: platform
important: true
appliesNot:
- model
- form
description: |
If smw_property is set to false the templates won't declare it as a semantic property.
Please note that the field can't be queried then.
example:
- |
smw_property: false
sf_form:
type: object
additionalProperties: true
important: true
specific: platform
appliesNot:
- model
- form
description: |
The sf_form property is an object that redirects all settings directly to Semantic Forms.<br>
If no value is necessary (e.g. "existing values only"), use true.
To see which options are supported, refer to the Semantic Forms manual.
link: https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#.27field.27_tag
example:
- |
sf_form:
input type: combobox
values from namespace: Manufacturer
max values: 1
existing values only: true
sf_overwrite:
type: string
specific: implementation
appliesNot:
- model
- form
description: |
Overwrites the final wikitext/HTML that is rendered in Semantic Forms Edit mode
smw_overwriteOutput:
type: string
specific: implementation
appliesNot:
- model
- form
description: |
Overwrites the final value of the field, used for both display and data set
example:
- |
smw_overwriteOutput: '[[CustomNamespace:{{FULLPAGENAME}}]]'
- |
smw_overwriteOutput: '{{FULLPAGENAME}}/subpath/{{{fieldId|}}}'
smw_overwriteOutputToLink:
type: boolean
specific: platform
appliesNot:
- model
- form
description: |
If true, this will create a link in display mode, using #formredlink if applicable.<br>
This needs to be used together with `smw_overwriteOutput`.
example:
- |
smw_overwriteOutput: 'CustomNamespace:{{FULLPAGENAME}}'
smw_overwriteOutputToLink: true
smw_overwriteDisplay:
type: string
specific: implementation
appliesNot:
- model
- form
description: |
Overwrites only the display value of the current field<br>
Is used similar to `smw_overwriteOutput`.
smw_overwriteData:
type: string
specific: implementation
appliesNot:
- model
- form
description: |
Overwrites the final #set or #subobject value of the field.<br>
Is used similar to `smw_overwriteOutput`
smw_appendFormField:
type: string
specific: implementation
appliesNot:
- model
- form
description: |
Adds wikitext after the form input field. This is only displayed when the form is in edit mode.
example:
- |
smw_appendFormField: ' [[:Category:Location|...]]'
smw_forceSet:
type: boolean
default: false
specific: platform
appliesNot:
- model
- form
description: |
Forces the semantic storage of the attribute through the #set parser function.<br>
This is useful for #subobject models that want to expose one or more fields as regular #set properties.
example:
- |
smw_forceSet: true
smw_arraymaptemplate:
type: string
link: https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Semantic_Forms_and_templates#arraymaptemplate
default: false
specific: platform
appliesNot:
- model
- form
description: |
Name of the arraymap template to use.<br>
Field needs to be of type `array`.
example:
- |
smw_arraymaptemplate: ArrayMapRemoveNamespaceTags
smw_drilldown:
type: boolean
default: false
specific: platform
appliesNot:
- model
- form
description: |
If the global settings `smw_semanticDrilldown` is enabled,
fields with smw_drilldown set to true will be filterable.
example:
- |
smw_drilldown: true