Blueprint Validation

Atlassian Confluence is an excellent tool for building knowledge in an organization or user group. This knowledge may be customer or product details, employee profiles, IT and production resources, technologies, etc. However, in most cases, the data in Confluence is not well suited for automated processing. Wiki-based content editor engine provides format that is too loose for most data-processing software.

The Blueprint Validation plugin addresses the problem described above. It converts Confluence page storage format into a typed JSON object and validates the resulting data object against applicable JSON-schema. If a page (or rather data in a page) is not valid than the system will generate a notification and provide relevant error details. Confluence administrator can prohibit saving invalid pages or configure Confluence to just show a warning popup and proceed with page save.

Let's take a look at an example. Suppose we store company data in Confluence. We've developed a template:

images/wiki/download/attachments/44696031/Screenshot-71.png

We want to make sure that users complete it with less probability of an error so we create a JSON schema and register it with the template:

{
"type" : "object",
"properties" : {
"title" : "string",
"position" : "number",
"value" : "number",
"assets" : "number",
"sales" : "number",
"profits" : "number",
"country" : "string"
},
"required" : [ "title", "position", "value", "assets", "sales", "profits" ],
"additionalProperties" : false
}

A user filling in the template omits a mandatory field and attempts to save a page. But he can't – the data is not valid:

images/wiki/download/attachments/44696031/Screenshot-73.png

Once the error is corrected, the page is saved and the data is there in the system:

images/wiki/download/attachments/44696031/Screenshot_2020-05-06_at_21.31.42.png

How can a user utilise this data? This really depends on business requirements. The data can be consumed by another Confluence plugin, exported via API to a third-party application or simply reported using Confluence macro:

images/wiki/download/attachments/44696031/Screenshot_2020-05-06_at_21.38.29.png

JSON schema used to validate a page can be uploaded by Confluence administrator or generated automatically by the plugin from Confluence template. To supplement JSON schema validation the plugin publishes a Confluence event that third-party developers can handle and apply their own business logic to the data.

To complement server-side validation, the plugin provides data validation tools on the browser side. This includes lists of values, regular expressions, CQL filters, and other validators. Confluence administrators can customise validators to meet their business requirements. Third-party developers can build their own validators as described later in this document.

Table of Contents

Markup

This section details how to add custom markup to Confluence templates to get page contents unambiguously converted into JSON format

Validators

This section details how to use validators to help users fill Confluence templates

Report Macro

This section details how to use the report macro to get data visualised in Confluence

Administration

This section details on configuration options provided by the plugin

API Reference

This section contains REST API reference and examples