Webapp manifest

A webapp manifest is a JSON structure used to build webapps. The target audience for this is developers. In an ideal world developers should be able to build any application by constructing a webapp manifest.

Root level

{
  "version": "1.0",
  "schema": {
    // ...
  }
}
Variable
Required
Description

version

Yes

Signifies which parser to use for this manifest. If it's decided to change the structure of manifests, it will be required to bump this to 2.0. Then a different parser will be able to pick it up. For now, only 1.0 is used so this guide is focused only on this version.

schema

Yes

Contents of the manifest.

Schema level

{
  "config": {
    "initial_screen": "start",
    "currency_template": "(currency) (amount, 1.2-2, ',', ' ')",
    "date_format": "DD/MM/YYYY",
    "default_values": {
      "data.loss_enabled": true
    },
    "overwrite_values": {
      "data.theft_enabled": true
    },
    "computed_values": {
      "data.policy_start_date": {
        "value": {
          "type": "jsonlogic",
          "schema": {
            "var": "active_policy.quote.customer_input.start_date"
          }
        }
      }
    },
    "requests": [
      {
        "type": "quote"
      },
      {
        "type": "policy",
        "field_definition": [
          {
            "path": "data",
            "name": "optin1",
            "validation": "required_true"
          }
        ]
      },
      {
        "type": "payment"
      }
    ]
  },
  "layout": {
    // ...
  },
  "flow": [
    {
      // ...
    }
  ]
}
Variable
Required
Example
Description

config.initial_screen

Yes

"start"

Unique identifier (path) of the initial screen.

config.currency_template

No

"(currency) (amount, 1.2-2, ',', ' ')"

config.date_format

No

"DD/MM/YYYY"

config.default_values

No

{"field":"value"}

Object of default values applied to the form.

config.overwrite_values

No

{"field":"value"}

Overwrite input state values.

config.computed_values

No

{"field":{"value":{...}}}

config.requests

No

[{ ... }]

layout

No

{"custom":{"components":[ ... ]}}

flow

Yes

[{ ... }]

Last updated