-
Notifications
You must be signed in to change notification settings - Fork 1
VOML
VOML stands for Value Object Markup Language.
You can define a simple scalar value object. The type and the name of the value object should be defined on the same line. It is a convention that VO types are in lowercase and VO names are in camel case.
integer NumberOfStarships
string StarshipName
boolean IsStarshipStarfleet
You can define a value object as having a set of values.
enum StarshipClass {
GALAXY
INTREPID
DEFIANT
CONSTITUTION
}
You can define a value object as having a set of properties, which are themselves value objects.
composite Starship {
id: StarshipId!
name: StarshipName!
registry: StarshipRegistry!
captain: Captain!
firstOfficer: FirstOfficer
}
The exclamation mark (!) marks the property as required.
You can define a value object as holding another type of value object.
set SetOfIntegers[AnIntegerVO]
A value object definition can be marked up as having additional configuration. These are simple key/value pairs separated by spaces.
A value object itself can have configuration:
composite Message (messageType: event) {
...
}
The properties of a value object can have configuration:
composite Starship {
property: Property (key1: value1 key2: value2)
}