Skip to main content

Manifest schema

What each field is for, with an example, is in The manifest. A manifest that does not match this schema is refused when you save a version. Submission adds rules of its own: see The review.

Fields​

FieldRequiredValue
manifest_versionYesalways 1
nameYesstring, at most 100 characters
handleYesstring, matching ^[a-z0-9]+(-[a-z0-9]+)*$, at most 64 characters
install_urlYesURL: HTTPS, or HTTP on localhost, 127.0.0.1 or [::1]; no fragment, no *; at most 2048 characters
app_urlNoURL: HTTPS, or HTTP on localhost, 127.0.0.1 or [::1]; no fragment, no *; at most 2048 characters
redirect_urlsYeslist of URL: HTTPS, or HTTP on localhost, 127.0.0.1 or [::1]; no fragment, no *; at most 2048 characters, at least 1, at most 10, no duplicates
scopesYeslist of one of read_products, write_products, read_ingredients, write_ingredients, read_packagings, write_packagings, read_questionnaires, write_questionnaires, read_organizations, no duplicates
embeddedNoboolean
navigationNolist of object, with label, path, at most 10
extensionsNolist of object, with slot, label, path, at most 10
support_urlNoURL: HTTPS, or HTTP on localhost, 127.0.0.1 or [::1]; no fragment, no *; at most 2048 characters
privacy_urlNoURL: HTTPS, or HTTP on localhost, 127.0.0.1 or [::1]; no fragment, no *; at most 2048 characters
webhooksNolist of object, with topic, uri, at most 20

Each entry of navigation​

FieldRequiredValue
labelYesobject, with en, fr
pathYesstring, matching the pattern of the JSON Schema, at most 200 characters

Each entry of extensions​

FieldRequiredValue
slotYesone of product.details.tab, organization.overview.card
labelYesobject, with en, fr
pathYesstring, matching the pattern of the JSON Schema, at most 200 characters

Each entry of webhooks​

FieldRequiredValue
topicYesone of scores/updated, questionnaires/answered, app/scopes_updated, app/uninstalled, app_subscription/updated, app_charge/updated
uriYesHTTPS URL; no fragment, no *; at most 2048 characters

Conditions​

  • When navigation is present: embedded must be true, app_url is required.
  • When extensions is present: embedded must be true, app_url is required.
  • When embedded is true: app_url is required.

The JSON Schema​

manifest.v1.schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://dev.positive-app.fr/schemas/manifest.v1.schema.json",
"title": "Foodpilot marketplace app manifest, version 1",
"type": "object",
"required": [
"manifest_version",
"name",
"handle",
"install_url",
"redirect_urls",
"scopes"
],
"properties": {
"manifest_version": {
"const": 1
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"handle": {
"type": "string",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"maxLength": 64
},
"install_url": {
"$ref": "#/definitions/appUrl"
},
"app_url": {
"$ref": "#/definitions/appUrl"
},
"redirect_urls": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"uniqueItems": true,
"items": {
"$ref": "#/definitions/appUrl"
}
},
"scopes": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"read_products",
"write_products",
"read_ingredients",
"write_ingredients",
"read_packagings",
"write_packagings",
"read_questionnaires",
"write_questionnaires",
"read_organizations"
]
}
},
"embedded": {
"type": "boolean"
},
"navigation": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"label",
"path"
],
"properties": {
"label": {
"type": "object",
"additionalProperties": false,
"required": [
"en"
],
"properties": {
"en": {
"$ref": "#/definitions/navLabel"
},
"fr": {
"$ref": "#/definitions/navLabel"
}
}
},
"path": {
"type": "string",
"maxLength": 200,
"pattern": "^(?!.*/\\.\\.?(/|$))/[A-Za-z0-9._~!$&'()*+,=:@%/-]*$",
"not": {
"pattern": "%(2[eEfF]|5[cC])|//"
}
}
}
}
},
"extensions": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"slot",
"path",
"label"
],
"properties": {
"slot": {
"enum": [
"product.details.tab",
"organization.overview.card"
]
},
"label": {
"type": "object",
"additionalProperties": false,
"required": [
"en"
],
"properties": {
"en": {
"$ref": "#/definitions/navLabel"
},
"fr": {
"$ref": "#/definitions/navLabel"
}
}
},
"path": {
"type": "string",
"maxLength": 200,
"pattern": "^(?!.*/\\.\\.?(/|$))/[A-Za-z0-9._~!$&'()*+,=:@%/-]*$",
"not": {
"pattern": "%(2[eEfF]|5[cC])|//"
}
}
}
}
},
"support_url": {
"$ref": "#/definitions/appUrl"
},
"privacy_url": {
"$ref": "#/definitions/appUrl"
},
"webhooks": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"required": [
"topic",
"uri"
],
"additionalProperties": false,
"properties": {
"topic": {
"enum": [
"scores/updated",
"questionnaires/answered",
"app/scopes_updated",
"app/uninstalled",
"app_subscription/updated",
"app_charge/updated"
]
},
"uri": {
"$ref": "#/definitions/httpsUrl"
}
}
}
}
},
"definitions": {
"appUrl": {
"type": "string",
"maxLength": 2048,
"pattern": "^(https://[^\\s/#*@?:]+(:[0-9]{1,5})?|http://(localhost|127\\.0\\.0\\.1|\\[::1\\])(:[0-9]{1,5})?)(/[^\\s#*]*)?$"
},
"httpsUrl": {
"type": "string",
"maxLength": 2048,
"pattern": "^https://[^\\s/#*@?:]+(:[0-9]{1,5})?(/[^\\s#*]*)?$"
},
"navLabel": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"allOf": [
{
"if": {
"required": [
"navigation"
]
},
"then": {
"required": [
"embedded",
"app_url"
],
"properties": {
"embedded": {
"const": true
}
}
}
},
{
"if": {
"required": [
"extensions"
]
},
"then": {
"required": [
"embedded",
"app_url"
],
"properties": {
"embedded": {
"const": true
}
}
}
},
{
"if": {
"required": [
"embedded"
],
"properties": {
"embedded": {
"const": true
}
}
},
"then": {
"required": [
"app_url"
]
}
}
]
}