Open File Data Format

This section describes format of ReqView files with .reqw extension which are based on human readable JSON format.

This gives you advantage to store ReqView files under a revision control system (such as SVN, GIT, Mercurial, …) and use your favorite text comparison and merge tools. You can also easily implement your own tools for extracting information from ReqView documents or format conversions not supported by ReqView Synchronizer.

File Header

Each ReqView file has the following header:

{
id: "some-project-id",
// Content
documents: [ /* Documents */ ],
attachments: { /* Attachments */ },
traceability: { /* Traceability */ }
 
// Metadata
metadata: {
format: "2.3",
template: "project" | "document", // optional
 
// Optional file encryption
cipher: "aes-256-cbc", // for encrypted file only
iv: "bc55b87f981c3c0988fab4abfd8eaeeb", // for encrypted file only
salt: "nohz0Ahm5" // for encrypted file only
},
}

JavaScript
  • id is a unique project identifier
  • name is a project name
  • metadata:

    • format is a data format version string
    • template is present only for project / document templates and its set to “project” or “document” respectively
    • cipher is an OpenSSL cipher name, currently we support only aes-256 with CBC mode
    • iv is an initialization vector for the CBC mode, it is computed by OpenSSL when creating the key from user supplied password
    • salt is a parameter for decryption
  • documents is an array of documents described in Section Document below

  • attachments is a set of external attachments (images, documents, …) described in Section Attachments
  • traceability describes configuration of traceability links between objects in the project

If file is encrypted then documents, attachments and traceability sections are encoded as base64 text without line feeds.

Document

[
{ // Embedded document
id: "SR",
guid: "9894b889-4fba-490c-aec2-3cfa12a5535a",
name: "Document name",
lastChangedOn: "2013-10-10T22:58:09.370Z",
lastChangedBy: {
name: "Libor Bus",
email: "libor.bus@eccam.com",
company: "Eccam"
},
lastId: 123,
attributes: { ... },
data: [ ... ],
view: { ... }, // optional
synchronizer: { ... } // optional, filled by Synchronizer only
},
{ // External document stored in an separate file (not yet implemented)
id: "UR",
file: "UR.reqw-doc"
},
...
]

JavaScript
  • id is a unique ID of the document
  • guid is a global unique ID of the document
  • name is a document name string
  • lastChangedOn is date of last modification in ISO format
  • lastChangedBy is description of the author of the last modification
  • lastId is the ID of the last created object in the document (integer >= 0)
  • attributes is a set of custom document attributes, see Section Custom Attributes Definition .
  • data is an array of objects (requirements, tests, etc.), see Section Data.
  • view describes visual configuration of columns in the Requirements Table, see Section View.
  • synchronizer stores properties which Synchronizer uses for pairing ReqView document with its original import from a RM tool

Data

Data section stores an object array corresponding to the highest level sections and requirements. Each section has property children storing array of descendant sections and requirements.

[
{ // Section 1.
// Attributes
id: "27",
guid: "4bc9c705-3e6c-4707-8824-08fec2270a1a",
heading: "Section 1. Name", // only for section
status: "Draft",
discussion: [
{ // Comment
comment: "Some comment"
date: "2012-11-21T15:37:59.099Z",
author: { name: "Libor Bus", email: "libor.bus@eccam.com", company: "Eccam" }
},
{ /* Another comment */ }, ...
],
history: [
{ // Change record
attributesChanged: {
heading: "<old-value>"
},
changedBy: {
company: "Eccam",
email: "libor.bus@eccam.cz",
name: "Libor Bus"
},
changedOn: "2016-05-02T10:48:54.956Z"
},
{ /* Another change record */ }, ...
],
attachments: [
"UR-27_0_filename.ext",
/* Another attachment */, ...
]
children: [
{ // Requirement 1.0-1
// Attributes
id: "38",
guid: "00889740-5064-45e7-a266-3894308fef47",
text: "Requirement text", // only for requirement
status: "Approved",
discussion: [ ... ],
history: [ ... ],
links: {
linkTypeId: [ "25", ... ]
}
},
{ /* Another requirement */ }, ...
]
},
{ /* Another section */ }, ...
]

JavaScript
  • id is a unique integer identifier
  • guid is a global unique integer identifier
  • heading is a section heading string
  • text is a requirement text string
  • status is an example custom attribute
  • discussion is an array of comments where each comment stores date (ISO string), author name, email and company name and comment text
  • history is an array of change records where each change record stores changed property, date of change (ISO string) and author of change
  • attachments is an array of references to attachments, see Section Attachments
  • children is an ordered array of direct descendants (both sections and requirements)
  • links is an object storing links. The example illustrates an outgoing Reference link to the object with id 25 in the same document, see Section Traceability

View

View object stores information related to the current document view:

{
columns: [
{
attribute: "id",
width: "100px", // optional
},
{
attribute: "description",
},
{
attribute: "status",
hidden: true // optional
}
...
],
folding: [ // optional
"100",
"123",
...
]
}

JavaScript
  • columns is an ordered array of columns, where each column can have the following properties:

    • attribute an identifier of attribute, i.e. an internal attribute “id”, “description”, “discussion” or a custom attribute, e.g. “status”
    • width is optional width of the column, e.g. “100px”, “20em”, “30%” or “auto” (column will use whatever space remains); the default value is “auto”
    • hidden is optional flag which specifies if the column is hidden; the default value is false
  • folding is an ordered array of IDs of sections that are displayed as collapsed

Attachments

Each attachment is assigned an unique attachment identifier in the following form: reqid_seqnum_filename.ext, where reqid is id of the related requirement, seqnum is sequential number of the attachment and filename.ext is the original file name and extension.

{
// Embedded attachment
"27_0_filename.ext": {
data: "data:image/png;base64,iVBORw0KGg ... ",
},
// External attachment
"27_1_filename.ext": {
type: "image/png",
src: "attachments/27_1_filename.ext"
},
...
}

JavaScript
  • data stores an attachment content encoded according to data URI scheme
  • src path to an external attachment file (only for decrypted files)

Traceability

The traceability links configuration has the following JSON format:

{
linkTypeId: {
name: "Reference", // optional
source: "References", // optional
target: "Referenced by" // optional
}
}

JavaScript
  • linkTypeId is a link type identifier
  • name is a link type name
  • source is a short text describing the role of the link source
  • target is a short text describing the role of the link target
Updated for version 2.5.0