Document Context

The following documentation is generated from Document Context Schema describing Document Context that is passed to document templates when generating a document using Jinja2.

Document Context

The JSON representation of document context object provided to document templates in DSW.

Document Context (object)

UUID

UUID version 4 according to RFC4122

type

string

pattern

^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

Optional String

anyOf

type

string

type

null

String Map

Representation of simple map where both keys and values are strings

type

object

patternProperties

  • .*

type

string

Value Type

type

string

enum

StringQuestionValueType, NumberQuestionValueType, DateQuestionValueType, TextQuestionValueType

Desirability Level

Level to indicate if a question is desirable in certain phase of a questionnaire

anyOf

type

integer

type

null

SemVer

Simple semantic version tag, e.g., 1.0.45

type

string

pattern

^[0-9]+\.[0-9]+\.[0-9]+$

Knowledge Model ID

ID of knowledge model

type

string

pattern

^[a-zA-Z0-9\-]+$

Organization ID

ID of organization

type

string

pattern

^[a-zA-Z0-9\.]+$

Package ID

Unique composed ID for a package

type

string

pattern

^[a-zA-Z0-9\.]+:^[a-zA-Z0-9\-]+:^[0-9]+\.[0-9]+\.[0-9]+$

Timestamp

Standard ISO timestamp format, e.g., 2019-06-09T14:25:58.438Z

type

string

pattern

^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?Z$

Metric Measure

Entity capturing how certain metric is affected

type

object

properties

  • metricUuid

UUID

  • measure

type

number

maximum

1.0

minimum

0.0

  • weight

type

number

maximum

1.0

minimum

0.0

additionalProperties

False

Config

Configuration values useful for generating documents

type

object

properties

  • clientUrl

type

string

format

uri

  • levelsEnabled

type

boolean

additionalProperties

False

Desirability Level (object)

type

object

properties

  • createdAt

type

string

format

date-time

  • description

type

string

  • level

type

integer

  • title

type

string

  • updatedAt

type

string

format

date-time

additionalProperties

False

Metric

type

object

properties

  • abbreviation

type

string

  • createdAt

type

string

format

date-time

  • description

type

string

  • references

type

array

  • title

type

string

  • updatedAt

type

string

format

date-time

  • uuid

UUID

additionalProperties

False

Organization

type

object

properties

  • affiliations

type

array

items

type

string

  • description

type

string

  • name

type

string

  • organizationId

Organization ID

additionalProperties

False

Package Metadata

type

object

properties

  • createdAt

type

string

format

date-time

  • description

type

string

  • id

Package ID

  • kmId

Knowledge Model ID

  • name

type

string

  • organization

anyOf

Organization

type

null

  • organizationId

Organization ID

  • state

type

string

  • version

SemVer

  • versions

type

array

items

SemVer

additionalProperties

False

Indication Report

type

object

properties

  • answeredQuestions

type

integer

  • indicationType

type

string

enum

LevelsAnsweredIndication, AnsweredIndication

  • unansweredQuestions

type

integer

additionalProperties

False

Metric Report

type

object

properties

  • measure

type

number

maximum

1

minimum

0

  • metricUuid

UUID

additionalProperties

False

Chapter Report

type

object

properties

  • chapterUuid

UUID

  • indications

type

array

items

Indication Report

  • metrics

type

array

items

Metric Report

additionalProperties

False

Total (Summary) Report

type

object

properties

  • indications

type

array

items

Indication Report

  • metrics

type

array

items

Metric Report

additionalProperties

False

Report

type

object

properties

  • chapterReports

type

array

items

Chapter Report

  • createdAt

type

string

format

date-time

  • totalReport

Total (Summary) Report

  • updatedAt

type

string

format

date-time

  • uuid

UUID

additionalProperties

False

User

Information about a user

type

object

properties

  • active

type

boolean

  • affiliation

type

string

  • createdAt

type

string

format

date-time

  • email

type

string

format

email

  • firstName

type

string

  • groups

type

array

  • imageUrl

type

string

format

uri

  • lastName

type

string

  • permissions

type

array

items

type

string

  • role

type

string

enum

researcher, data_steward, admin

  • sources

type

array

items

type

string

  • updatedAt

type

string

format

date-time

  • uuid

UUID

additionalProperties

False

Knowledge Model

type

object

properties

  • chapterUuids

type

array

items

UUID

  • entities

Typed UUID-entity map of KM contents

type

object

properties

  • answers

type

object

patternProperties

  • .*

Answer

  • chapters

type

object

patternProperties

  • .*

Chapter

  • expert

type

object

patternProperties

  • .*

Expert

  • integrations

type

object

patternProperties

  • .*

Integration

  • questions

type

object

patternProperties

  • .*

Question

  • references

type

object

patternProperties

  • .*

Reference

  • tags

type

object

patternProperties

  • .*

Tag

additionalProperties

False

  • integrationUuids

type

array

items

UUID

  • name

type

string

  • tagUuids

type

array

items

UUID

  • uuid

UUID

additionalProperties

False

Answer

type

object

properties

  • advice

Optional String

  • followUpUuids

type

array

items

UUID

  • label

type

string

  • metricMeasures

type

array

items

Metric Measure

  • uuid

UUID

additionalProperties

False

Chapter

type

object

properties

  • questionUuids

type

array

items

UUID

  • text

type

string

  • title

type

string

  • uuid

UUID

additionalProperties

False

Expert

type

object

properties

  • name

type

string

  • email

type

string

format

email

  • uuid

UUID

additionalProperties

False

Integration

type

object

properties

  • id

type

string

  • itemUrl

type

string

  • logo

type

string

  • name

type

string

  • props

type

array

items

type

string

  • requestBody

type

string

  • requestHeaders

String Map

  • requestMethod

type

string

  • responseIdField

type

string

  • responseListField

type

string

  • responseNameField

type

string

  • uuid

UUID

additionalProperties

False

Value Question

type

object

properties

  • expertUuids

type

array

items

UUID

  • questionType

type

string

enum

ValueQuestion

  • referenceUuids

type

array

items

UUID

  • requiredLevel

anyOf

type

integer

type

null

  • tagUuids

type

array

items

UUID

  • text

Optional String

  • title

type

string

  • uuid

UUID

  • valueType

type

string

enum

DateQuestionValueType, NumberQuestionValueType, StringQuestionValueType, TextQuestionValueType

additionalProperties

False

Integration Question

type

object

properties

  • expertUuids

type

array

items

UUID

  • integrationUuid

UUID

  • props

String Map

  • questionType

type

string

enum

IntegrationQuestion

  • referenceUuids

type

array

items

UUID

  • requiredLevel

anyOf

type

integer

type

null

  • tagUuids

type

array

items

UUID

  • text

Optional String

  • title

type

string

  • uuid

UUID

additionalProperties

False

List Question

type

object

properties

  • expertUuids

type

array

items

UUID

  • itemTemplateQuestionUuids

type

array

items

UUID

  • questionType

type

string

enum

ListQuestion

  • referenceUuids

type

array

items

UUID

  • requiredLevel

anyOf

type

integer

type

null

  • tagUuids

type

array

items

UUID

  • text

Optional String

  • title

type

string

  • uuid

UUID

additionalProperties

False

Options Question

type

object

properties

  • answerUuids

type

array

items

UUID

  • expertUuids

type

array

items

UUID

  • questionType

type

string

enum

OptionsQuestion

  • referenceUuids

type

array

items

UUID

  • requiredLevel

anyOf

type

integer

type

null

  • tagUuids

type

array

items

UUID

  • text

Optional String

  • title

type

string

  • uuid

UUID

additionalProperties

False

Resource Page Reference

type

object

properties

  • referenceType

type

string

enum

ResourcePageReference

  • shortUuid

type

string

  • uuid

UUID

additionalProperties

False

URL Reference

type

object

properties

  • label

type

string

  • referenceType

type

string

enum

URLReference

  • url

type

string

format

uri

  • uuid

UUID

additionalProperties

False

Cross Reference

type

object

properties

  • description

type

string

  • referenceType

type

string

enum

CrossReference

  • targetUuid

UUID

  • uuid

UUID

additionalProperties

False

Tag

type

object

properties

  • color

type

string

  • description

type

string

  • name

type

string

  • uuid

UUID

additionalProperties

False

Answer Reply

type

object

properties

  • type

type

string

enum

AnswerReply

  • value

UUID

additionalProperties

False

Value Reply

type

object

properties

  • type

type

string

enum

StringReply

  • value

type

string

additionalProperties

False

Integration Plain Value

type

object

properties

  • type

type

string

enum

PlainValue

  • value

type

string

additionalProperties

False

Integration Value

type

object

properties

  • type

type

string

enum

IntegrationValue

  • id

type

string

  • value

type

string

additionalProperties

False

Integration Reply

type

object

properties

  • type

type

string

enum

IntegrationReply

  • value

anyOf

Integration Plain Value

Integration Value

additionalProperties

False

List Reply

type

object

properties

  • type

type

string

enum

ItemListReply

  • value

type

array

items

UUID

additionalProperties

False

Document Context (object)

Entity capturing how certain metric is affected

type

object

properties

  • config

Config

  • createdAt

When the document was created

type

string

format

date-time

  • createdBy

Issuer/author of the document

User

  • knowledgeModel

Compiled KM used in the questionnaire

Knowledge Model

  • level

The current desirability level in the questionnaire

type

integer

  • levels

Levels defined for the questionnaire

type

array

items

Desirability Level (object)

  • metrics

Metrics defined for the questionnaire

type

array

items

Metric

  • organization

Organization configured for the DSW instance

Organization

  • package

Metadata about the used KM package

Package Metadata

  • questionnaireName

Name of the questionnaire

type

string

minLength

1

  • questionnaireReplies

Replies in the questionnaire stored in map/dictionary where key is UUID path and value is the reply to question in that path

type

object

patternProperties

  • .*

Reply

  • questionnaireUuid

UUID of the questionnaire

UUID

  • report

Report computed for the questionnaire

Report

  • updatedAt

When the document was last updated

type

string

format

date-time

  • uuid

UUID of the document

UUID

additionalProperties

False