📄️ Introduction
Concerto models may be specified using either a JSON document, or using a set of domain-specific language files (the CTO format).
📄️ Namespaces
Each Concerto file (by convention with a .cto file extension) starts with the name and version of a single namespace. A Concerto namespace declares a set of declarations. A declaration is one of: enumeration, scalar, concept, asset, participant, transaction, event.
📄️ Imports
In order for one namespace to reference types defined in another namespace, the types must be imported from a versioned namespace. Via imports you can decompose your modles into discrete files (and namespaces), version them and build a graph of dependencies between your models.
📄️ Enumerations
Enumerations are used to capture static lists of domain values.
📄️ Scalars
Primitive types (String, Boolean, Integer, Long, Double, DateTime) may be declared and reused via a scalar declaration.
📄️ Concepts
Concepts are similar to class declarations in most object-oriented languages, in that they may have a super-type and a set of typed properties:
📄️ Properties
Class declarations contain properties. Each property has a type which can either be a type defined in the same namespace, an imported type, or a primitive type.
📄️ Relationships
A relationship in Concerto Modeling Language (CML) is a tuple composed of:
📄️ Decorators
Model elements may have arbitrary decorators (aka annotations) placed on them. These are available via API and can be useful for tool vendors to extend the metamodel.
📄️ Metamodel JSON
Concerto models may be fully represented via the metamodel JSON format.
📄️ Maps
A Map is a type which models data as key-value pairs. Conceptually, it relates closely to a Map type in Javascript or C#.