Skip to content

Commit 9f3d420

Browse files
authored
Bug fixes and minor enhancements in full report template ftls (#284)
1 parent d87132e commit 9f3d420

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

org.contextmapper.dsl.ui/samples/freemarker/markdown-templates/bounded-contexts/bounded-context-list-detailed.ftl

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,60 @@
1+
12
<#list filterStructuralBoundedContexts(boundedContexts) as bc>
23
## Bounded Context ${bc.name}<#lt>
34

45
*${bc.name}* has this domain vision statement: ${bc.domainVisionStatement!"[domain vision of the context not defined]"}<#lt>
56

67
<#list bc.aggregates as agg>
78
### Aggregate ${agg.name}<#lt>
8-
This aggregate can be classified as ${agg.doc!"[no doc string]"}. Its responsibilities are:<#lt>
9-
10-
<#if agg?has_content>
9+
This aggregate can be classified as ${agg.doc!"[n/a]"}. <#if agg.responsibilities?has_content>Its responsibilities are:<#lt>
1110
<#list agg.responsibilities as r>
1211
* ${r}<#lt>
1312
</#list>
1413
<#else>
15-
* [no (more) responsibilities defined]<#lt>
14+
<#-- * [no (more) responsibilities defined]<#lt> -->
1615
</#if>
1716

1817
<#assign entities = agg.domainObjects?filter(do -> instanceOf(do, Entity))>
1918
<#if entities?has_content>
19+
2020
#### Entities (in Aggregate)<#lt>
2121
<#list entities as dob>
2222
##### ${dob.name}<#lt>
23-
${dob.hint!"[hint missing]"}<#lt>
23+
${dob.hint!"[no hint]"}<#lt>
2424

2525
<@attrOpsMacro.renderDomainObjectOperationsAndAttributes dob />
26+
2627
</#list>
2728
</#if>
2829

2930
<#if agg.services?has_content>
3031
#### Services<#lt>
3132
<#list agg.services as s>
3233
##### ${s.name}<#lt>
33-
${s.hint!"[hint missing]"}<#lt>
34-
</#list>
34+
${s.hint!"[no hint]"}<#lt>
35+
36+
<#-- move to macro? -->
37+
<#if s.operations?has_content>
38+
Operations:<#lt>
39+
| Operation | Doc String | Parameters | Return Type | State Transition |<#lt>
40+
|-|-|-|-|-|<#lt>
41+
<#list s.operations as op>
42+
| ${op.name} | ${op.doc!"*n/a*"} | <#if op.parameters?has_content><#list op.parameters as p> ${p.name} of type ${getType(p.parameterType)} </#list> <#else> none </#if> | <#if op.returnType?has_content>${getType(op.returnType)}<#else>none</#if> | <#if op.stateTransition?has_content>: [<@stateTransitionMacro.renderStateTransition op.stateTransition />]</#if> |<#lt>
43+
</#list>
44+
</#if>
45+
</#list>
46+
3547
</#if>
3648

3749
<#assign valueObjects = agg.domainObjects?filter(do -> instanceOf(do, ValueObject))>
3850
<#if valueObjects?has_content>
3951
#### Value Objects<#lt>
4052
<#list valueObjects as dob>
4153
##### ${dob.name}<#lt>
42-
${dob.hint!"[hint missing]"}<#lt>
54+
${dob.hint!"[no hint]"}<#lt>
4355

4456
<@attrOpsMacro.renderDomainObjectOperationsAndAttributes dob />
57+
4558
</#list>
4659
</#if>
4760

@@ -50,7 +63,7 @@
5063
#### Enumerations (Enums)<#lt>
5164
<#list enums as dob>
5265
##### ${dob.name}<#lt>
53-
${dob.hint!"[hint missing]"}<#lt>
66+
${dob.hint!"[no hint]"}<#lt>
5467

5568
Values:<#lt>
5669
<#list dob.values as value>
@@ -68,7 +81,7 @@
6881
<#elseif instanceOf(dob, CommandEvent)>
6982
##### ${dob.name} (CommandEvent)<#lt>
7083
</#if>
71-
${dob.hint!"[hint missing]"}<#lt>
84+
${dob.hint!"[no hint]"}<#lt>
7285

7386
<@attrOpsMacro.renderDomainObjectOperationsAndAttributes dob />
7487
</#list>
@@ -82,21 +95,21 @@
8295
Services:<#lt>
8396

8497
<#list bc.application.services as s>
85-
* ${s.name}<#lt>. ${s.hint!"[hint missing]"}<#lt>
98+
* ${s.name}<#lt>. ${s.hint!"[no hint]"}<#lt>
8699
</#list>
87100
</#if>
88101

89102
<#if bc.application.events?has_content>
90103
Events:<#lt>
91104
<#list bc.application.events as event>
92-
* ${event.name}. ${event.hint!"[hint missing]"}<#lt>
105+
* ${event.name}. ${event.hint!"[no hint]"}<#lt>
93106
</#list>
94107
</#if>
95108

96109
<#if bc.application.commands?has_content>
97110
Commands:<#lt>
98111
<#list bc.application.commands as command>
99-
* ${command.name}. ${command.hint!"[hint missing]"}<#lt>
112+
* ${command.name}. ${command.hint!"[no hint]"}<#lt>
100113
</#list>
101114
</#if>
102115

org.contextmapper.dsl.ui/samples/freemarker/markdown-templates/domain-objects/domain-object-attribute-and-operation-tables.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<#macro renderDomainObjectOperationsAndAttributes simpleDomainObject>
55
<#if simpleDomainObject.operations?has_content>
66
Operations:<#lt>
7-
| Operation | Doc string | Parameters | Return Type | State Transition |<#lt>
7+
| Operation | Doc String | Parameters | Return Type | State Transition |<#lt>
88
|-|-|-|-|-|<#lt>
99
<#list simpleDomainObject.operations as op>
1010
| ${op.name} | ${op.doc!"*no doc string*"} | <#if op.parameters?has_content> <#list op.parameters as p> ${p.name} of type ${getType(p.parameterType)} </#list> <#else> none </#if> | <#if op.returnType?has_content>${getType(op.returnType)}<#else>none</#if> | <#if op.stateTransition?has_content>: [<@stateTransitionMacro.renderStateTransition op.stateTransition />]</#if> |<#lt>
@@ -13,7 +13,7 @@
1313

1414
<#if simpleDomainObject.attributes?has_content>
1515
Attributes:<#lt>
16-
| Attribute | Doc/doc string | Visibility | Type |<#lt>
16+
| Attribute | Doc String | Visibility | Type |<#lt>
1717
|-|-|-|-|<#lt>
1818
<#list simpleDomainObject.attributes as attr>
1919
| ${attr.name} | ${attr.doc!"*no doc string*"} | ${attr.visibility} | ${attr.type} |<#lt>

0 commit comments

Comments
 (0)