manifest
Version:
The backend for AI code editors
93 lines (92 loc) • 3.78 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.manifest.build/definitions/property-schema.json",
"title": "Property Schema",
"description": "A property in your entity. Doc: https://manifest.build/docs/properties",
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"description": "The name of the property. Doc: https://manifest.build/docs/properties",
"type": "string"
},
"type": {
"description": "The type of the property: text, number, link, currency... Default \"string\". Doc: https://manifest.build/docs/properties#property-types",
"type": "string",
"enum": [
"string",
"text",
"richText",
"number",
"link",
"money",
"date",
"timestamp",
"email",
"boolean",
"password",
"choice",
"location",
"file",
"image"
]
},
"validation": {
"description": "Validation object for the property.",
"$ref": "./validation-schema.json"
},
"default": {
"description": "The default value of the property. Doc: https://manifest.build/docs/properties#property-params",
"type": ["string", "number", "boolean", "object", "array"]
},
"hidden": {
"description": "If the property should be hidden in the API response. Default false. Doc: https://manifest.build/docs/properties#property-params",
"type": "boolean"
},
"options": {
"allOf": [
{
"$ref": "./property-options-schema.json"
}
],
"oneOf": [
{
"if": {
"type": "object",
"properties": { "type": { "const": "money" } }
},
"then": {
"$ref": "./property-options/money-options-schema.json"
}
},
{
"if": {
"type": "object",
"properties": { "type": { "const": "choice" } }
},
"then": {
"$ref": "./property-options/choice-options-schema.json"
}
},
{
"if": {
"type": "object",
"properties": { "type": { "const": "image" } }
},
"then": {
"$ref": "./property-options/image-options-schema.json"
}
}
]
}
},
"required": ["name"],
"additionalProperties": false
},
{
"type": "string",
"description": "A simple string representing the type of the property."
}
]
}