Skip to content

Commit

Permalink
fix: 🐜 diagram without links (#108)
Browse files Browse the repository at this point in the history
* fix: 🐜 diagram without links

* manually increment version

* fix: 🐛 test non-reg

---------

Co-authored-by: Julien Boz <[email protected]>
  • Loading branch information
jboz and Julien Boz authored Nov 28, 2023
1 parent 4745709 commit c0d2e46
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 74 deletions.
11 changes: 11 additions & 0 deletions DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ Le projet [livingdoc-typescript-plugin](livingdoc-typescript-plugin) librairie p
## CI/CD

PR obligatoire.

## Tips

### generate image from html

copy svg content into generated html
```bash
yay -S wkhtmltox-bin
cd sources/living-documentation/livingdoc-examples/microservice
wkhtmltoimage --format png http://localhost:63342/living-documentation/livingdoc-examples/microservice/target/docs/index.html images/example_microservice_index.html.png
```
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-cargo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-cargo</artifactId>
Expand All @@ -30,4 +30,4 @@
<artifactId>aggregate-sharedhandling</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-handling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-handling</artifactId>
Expand All @@ -34,4 +34,4 @@
<artifactId>aggregate-cargo</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-location/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-location</artifactId>
Expand All @@ -18,4 +18,4 @@
<artifactId>aggregate-shared</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-shared</artifactId>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-sharedhandling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-sharedhandling</artifactId>
Expand All @@ -18,4 +18,4 @@
<artifactId>aggregate-shared</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-voyage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-voyage</artifactId>
Expand All @@ -22,4 +22,4 @@
<artifactId>aggregate-location</artifactId>
</dependency>
</dependencies>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/aggregate-zz-livingdoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>aggregate</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate-zz-livingdoc</artifactId>
Expand Down Expand Up @@ -101,4 +101,4 @@
</plugins>
<!-- end::plugin-livingdoc[] -->
</build>
</project>
</project>
4 changes: 2 additions & 2 deletions livingdoc-examples/aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>aggregate</artifactId>
Expand Down Expand Up @@ -69,4 +69,4 @@
<module>aggregate-handling</module>
<module>aggregate-zz-livingdoc</module>
</modules>
</project>
</project>
2 changes: 1 addition & 1 deletion livingdoc-examples/ddd-annotated/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>ddd-annotated</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/ddd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>

<artifactId>ddd</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/microservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
</parent>
<artifactId>microservice</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>ch.ifocusit.livingdoc.example</groupId>
<artifactId>livingdoc-examples</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Living Documentation example</name>
Expand Down
2 changes: 1 addition & 1 deletion livingdoc-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>ch.ifocusit.livingdoc</groupId>
<artifactId>livingdoc-maven-plugin</artifactId>
<version>2.4-SNAPSHOT</version>
<version>2.5-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Living Documentation maven plugin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class DiagramMojo extends AbstractDocsGeneratorMojo {
* Add link into diagram to glossary
*/
@Parameter(property = "livingdoc.diagram.link.activate", defaultValue = "false")
private boolean diagramWithLink = true;
private boolean diagramWithLink;

/**
* Link template to use in diagram.
Expand Down Expand Up @@ -178,9 +178,6 @@ public void executeMojo() throws MojoExecutionException {
diagramWithLink = true;
diagramImageType = DiagramImageType.svg;
}
if (StringUtils.isNotBlank(diagramLinkPage)) {
diagramWithLink = true;
}
// generate diagram
String diagram = generateDiagram();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@ header
Microservice classes diagram
endheader

abstract class "Access" [[glossary.html#glossaryid-400{400}]] {
phoneNumber : String [[[glossary.html#glossaryid-401{401}]]]
price : BigDecimal [[[glossary.html#glossaryid-402{402}]]]
dateTime : ZonedDateTime [[[glossary.html#glossaryid-403{403}]]]
abstract class "Access" {
phoneNumber : String
price : BigDecimal
dateTime : ZonedDateTime
}

class "Bill" [[glossary.html#glossaryid-100{100}]] #pink {
month : YearMonth [[[glossary.html#glossaryid-101{101}]]]
contract : Contract [[[glossary.html#glossaryid-102{102}]]]
accesses : Set<Access> [[[glossary.html#glossaryid-103{103}]]]
customerInformed : boolean [[[glossary.html#glossaryid-Bill_customerInformed{Bill.customerInformed}]]]
class "Bill" #pink {
month : YearMonth
contract : Contract
accesses : Set<Access>
customerInformed : boolean
}

interface "BillRepository" [[glossary.html#glossaryid-BillRepository{BillRepository}]] {
interface "BillRepository" {
add(Bill) : Bill
clear()
get(YearMonth) : Optional<Bill>
retreiveLastBill() : Optional<Bill>
}

class "BillingService" [[glossary.html#glossaryid-BillingService{BillingService}]] {
repository : BillRepository [[[glossary.html#glossaryid-BillingService_repository{BillingService.repository}]]]
class "BillingService" {
repository : BillRepository
getBill(String) : Optional<Bill>
}

class "CallAccess" [[glossary.html#glossaryid-500{500}]] {
duration : Duration [[[glossary.html#glossaryid-501{501}]]]
class "CallAccess" {
duration : Duration
}

class "Contract" [[glossary.html#glossaryid-200{200}]] {
id : String [[[glossary.html#glossaryid-201{201}]]]
customer : Customer [[[glossary.html#glossaryid-202{202}]]]
effectDate : LocalDate [[[glossary.html#glossaryid-203{203}]]]
class "Contract" {
id : String
customer : Customer
effectDate : LocalDate
}

class "Customer" [[glossary.html#glossaryid-300{300}]] {
name : String [[[glossary.html#glossaryid-301{301}]]]
contracts : Set<Contract> [[[glossary.html#glossaryid-Customer_contracts{Customer.contracts}]]]
class "Customer" {
name : String
contracts : Set<Contract>
}

class "ListBillRepository" [[glossary.html#glossaryid-ListBillRepository{ListBillRepository}]]
class "ListBillRepository"

class "SmsAccess" [[glossary.html#glossaryid-600{600}]]
class "SmsAccess"

"Access" <|-- "CallAccess"
"Access" <|-- "SmsAccess"
Expand All @@ -61,4 +61,4 @@ class "SmsAccess" [[glossary.html#glossaryid-600{600}]]
"Contract" "*" <-> "Customer" : customer/contracts

hide BillingService fields
@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,57 @@
title All classes diagram
abstract class "AbstractDomain" [[glossary.html#glossaryid-AbstractDomain{AbstractDomain}]]
abstract class "AbstractDomain"
abstract class "Access" [[glossary.html#glossaryid-400{400}]] {
phoneNumber : String [[[glossary.html#glossaryid-401{401}]]]
price : BigDecimal [[[glossary.html#glossaryid-402{402}]]]
dateTime : ZonedDateTime [[[glossary.html#glossaryid-403{403}]]]
abstract class "Access" {
phoneNumber : String
price : BigDecimal
dateTime : ZonedDateTime
}
class "Bill" [[glossary.html#glossaryid-100{100}]] #wheat {
month : YearMonth [[[glossary.html#glossaryid-101{101}]]]
contract : Contract [[[glossary.html#glossaryid-102{102}]]]
accesses : Set<Access> [[[glossary.html#glossaryid-103{103}]]]
customerInformed : boolean [[[glossary.html#glossaryid-Bill_customerInformed{Bill.customerInformed}]]]
class "Bill" #wheat {
month : YearMonth
contract : Contract
accesses : Set<Access>
customerInformed : boolean
}
interface "BillRepository" [[glossary.html#glossaryid-BillRepository{BillRepository}]] {
interface "BillRepository" {
add(Bill) : Bill
clear()
get(YearMonth) : Optional<Bill>
retreiveLastBill() : Optional<Bill>
}
class "BillingService" [[glossary.html#glossaryid-BillingService{BillingService}]] {
repository : BillRepository [[[glossary.html#glossaryid-BillingService_repository{BillingService.repository}]]]
class "BillingService" {
repository : BillRepository
getBill(String) : Optional<Bill>
}
class "CallAccess" [[glossary.html#glossaryid-500{500}]] {
duration : Duration [[[glossary.html#glossaryid-501{501}]]]
class "CallAccess" {
duration : Duration
}
class "Contract" [[glossary.html#glossaryid-200{200}]] {
id : String [[[glossary.html#glossaryid-201{201}]]]
customer : Customer [[[glossary.html#glossaryid-202{202}]]]
effectDate : LocalDate [[[glossary.html#glossaryid-203{203}]]]
class "Contract" {
id : String
customer : Customer
effectDate : LocalDate
}
class "Customer" [[glossary.html#glossaryid-300{300}]] {
name : String [[[glossary.html#glossaryid-301{301}]]]
contracts : Set<Contract> [[[glossary.html#glossaryid-Customer_contracts{Customer.contracts}]]]
class "Customer" {
name : String
contracts : Set<Contract>
}
class "ListBillRepository" [[glossary.html#glossaryid-ListBillRepository{ListBillRepository}]] {
bills : List<Bill> [[[glossary.html#glossaryid-ListBillRepository_bills{ListBillRepository.bills}]]]
class "ListBillRepository" {
bills : List<Bill>
add(Bill) : Bill
clear()
get(YearMonth) : Optional<Bill>
retreiveLastBill() : Optional<Bill>
}
class "SmsAccess" [[glossary.html#glossaryid-600{600}]]
class "SmsAccess"
"AbstractDomain" <|-- "Access"
"AbstractDomain" <|-- "Bill"
Expand Down

0 comments on commit c0d2e46

Please sign in to comment.