Skip to main content

Model Format Changelog

Every change to the format of the class files, per format version. Files in an older format keep loading: the platform converts them on load, and the upgrade download rewrites them for you.

Version 1​

The first versioned format. It makes the vocabulary consistent: a definition is a class, a typed property of a class is a field, and type is only used to tell which kind of script or layout item an object is. Files without a version are format 0.

JSON Schema: https://api.mosterd.com/schema/definition-v1.schema.json

Renamed properties​

Format 0Format 1
—"version": 1 at the top of the file
type (of the class: BASIC, ABSTRACT, NONE, EXTENSION)kind (BASIC, ABSTRACT, CONFIG, EXTENSION)
"type": "NONE""kind": "CONFIG"
valueTypesfields
nameValueTypenameField
customKeyNamecustomKeyField
relations[].typerelations[].class
formulas[].valueTypeformulas[].field
translations[].valueTypeLabelstranslations[].fieldLabels
layouts[].typelayouts[].kind
layouts[].labelKeylayouts[].label
assets[].typeassets[].kind
generalSearchTypegeneralSearchClasses
navigationType (NAVIGATE layout items)navigationKind

Changed values​

WhatFormat 0Format 1
Script typejavascript, functionGateway, consumerGateway, producerGatewayJAVASCRIPT, FUNCTION_GATEWAY, CONSUMER_GATEWAY, PRODUCER_GATEWAY
JavaScript producer"type": "javascript" with "producer": true"type": "JAVASCRIPT_PRODUCER"
Column aggregatesum, avg, countSUM, AVG, COUNT
Label prefixesDATA_CLASS_SINGULAR:, DATA_CLASS_PLURAL:, VALUE_TYPE_LABEL:CLASS_SINGULAR:, CLASS_PLURAL:, FIELD_LABEL:
scripts[].trigger, generalSearchClassesA single value or an arrayAlways an array
File references (javascriptFile, utilitiesFiles, templateFile, promptFile, schemaFile)Extension optional (scripts/logNoteChange)Always with extension (scripts/logNoteChange.js)
Platform properties as a column or filter nametype, creationDate, modificationDate_class, _creationDate, _modificationDate
Gateway target that changes the object's class"name": "_type""name": "_class"
Class filter in a formula's relation bracketcontents[type=task]contents[class=task]

In format 0, type, creationDate and modificationDate as a column or view-filter name meant the platform property unless the class had a field of that name. In format 1 they are ordinary field names; the platform properties start with _.

References by class name​

A related class is always named by its qualified name (commons.dossier), never by the relation's REST name (dossier, invoiceLines):

WhereFormat 0Format 1
Archetype relation slots in archetypes[].slots"container": "dossier""container": "commons.dossier"
Report context[].relation"relation": "invoiceLines""relation": "commons.invoiceLine"

In a format 1 file, a REST name in these places is an error that suggests the class name.

New​

  • apiVersion on scripts. The version of the script API a JavaScript script was written for, or the contract version of a gateway. Scripts from a format 0 file get apiVersion: 0 on conversion; a script without it uses version 1.
  • $schema. An optional editor hint; see Editor support.

Stricter checks​

These apply to every file, whatever its format:

  • An unknown property refuses the model instead of being ignored.
  • Field, script and file references are checked when the model loads instead of when they are used.
  • Field names are lowerCamelCase and never contain _.
  • A refused model does not replace the active one. See Loading a model.

Deprecated​

Nothing.