Skip to content

v3.4.0

Compare
Choose a tag to compare
@mttrbrts mttrbrts released this 25 Jan 09:10
· 203 commits to main since this release
1152bf6

What's Changed

  • Enhancements to identifiers. The format for identifiers in Concerto (i.e. the name of Concepts, Properties etc.) has been relaxed to allow values such as false, true and null. The format is now consistently applied too, in particular, it is enforced in the JS API and JSON AST.
  • JSON Schema generation from Concerto models will now include an anyOf declaration for types with multiple subtypes
  • UML output (to Mermaid and PlantUML) for models now supports optional generation of Composition and Aggregation relationships in diagrams. UML output can also omit the base Concerto types (such as Concept).

Access the new options via the API parameters or CLI flags.

$ concerto compile --target mermaid --model model.cto --showCompositionRelationships --hideBaseModel
classDiagram
class `org.acme.Root` {
<< concept>>
   + `String` `firstName`
   + `String` `lastName`
   + `DateTime` `dob`
   + `Integer` `age`
   + `Double` `height`
   + `Children[]` `children`
}

`org.acme.Root` "1" *-- "*" `org.acme.Children`
`org.acme.Root` "1" o-- "1" `org.acme.Company` : company
class `org.acme.Person`
<< concept>> `org.acme.Person`

class `org.acme.Children` {
<< concept>>
   + `String` `name`
   + `Integer` `age`
   + `String` `hairColor`
   + `Boolean` `coolDude`
   + `String` `missing`
   + `Pet` `pet`
   + `String[]` `favoriteColors`
   + `Integer[]` `favoriteNumbers`
   + `String[]` `mixed`
   + `String[]` `arrayOfNull`
   + `String[]` `emptyArray`
   + `Pet[]` `favoritePets`
   + `Stuff[]` `stuff`
}

`org.acme.Children` "1" *-- "1" `org.acme.Pet`
`org.acme.Children` "1" *-- "*" `org.acme.Pet`
`org.acme.Children` "1" *-- "*" `org.acme.Stuff`
`org.acme.Children` --|> `org.acme.Person`
class `org.acme.Pet` {
<< concept>>
   + `String` `name`
   + `String` `breed`
}

class `org.acme.Stuff` {
<< concept>>
   + `String` `ssn`
   + `String` `firstName`
   + `String` `sku`
   + `Double` `price`
   + `Pet` `product`
}

`org.acme.Stuff` "1" *-- "1" `org.acme.Pet`
class `org.acme.Company` {
<< concept>>
   + `String` `name`
   + `Employee[]` `employees`
}

`org.acme.Company` "1" *-- "*" `org.acme.Employee`
class `org.acme.Employee` {
<< concept>>
   + `String` `name`
}

`org.acme.Employee` --|> `org.acme.Person`

Commits

  • feat(core): relax reserved property names by @mttrbrts in #581
  • feat(tools): add composition, aggregation relationships in UML by @mttrbrts in #595
  • fix(tools): JSON Schema generation improvements for base types #592 by @dselman in #593
  • fix(core): enforce identifier validation on AST JSON by @mttrbrts in #591
  • test(core): fix system time offset for tests by @mttrbrts in #590
  • chore(actions): publish v3.3.0 to npm by @github-actions in #588

Full Changelog: v3.3.0...v3.4.0