mvillafuertem / mdoc-modifier   0.1

GitHub

Mdoc Modifier 🖥 helps you to document 📝 with PlantUML ⚙️

Scala versions: 2.13 2.12

⚠️ PLEASE, DO NOT EDIT THIS FILE. IT IS AUTOGENERATE YOU SHOULD EDIT modules/docs/src/main/mdoc/README.md WITH THE COMMAND sbt mdoc-modifier-docs/mdoc


:bowtie:

Mdoc Modifier 0.1

[TOC]

TODO: Description

Akka HTTP

libraryDependencies += "io.github.mvillafuertem" %% "mdoc-modifier-akka-http" % "0.1"
import org.scalatest._
import io.github.mvillafuertem.mdoc.modifier.akka.http.sample.SampleApplicationSpec

nocolor.run(new SampleApplicationSpec)
// SampleApplicationSpec:
// Sample Application
// Complete(HttpResponse(200 OK,List(),HttpEntity.Strict(application/json,16 bytes total),HttpProtocol(HTTP/1.1)))
// 
// ## `GET / http://example.com/health`
// 
// List()
// 
// 
// ```
// 
// HttpEntity.Strict(none/none,0 bytes total)
// 
// ```
// 
// ### Response
// 
// HTTP/1.1 200 OK
// 
// List()
// 
// ```
// 
// HttpEntity.Strict(application/json,16 bytes total)
// 
// ```
//        
// - should health

SampleApplicationSpec: Sample Application Complete(HttpResponse(200 OK,List(),HttpEntity.Strict(application/json,16 bytes total),HttpProtocol(HTTP/1.1)))

GET / http://example.com/health

List()


HttpEntity.Strict(none/none,0 bytes total)

Response

HTTP/1.1 200 OK

List()


HttpEntity.Strict(application/json,16 bytes total)

  • should health

PlantUML 📊

libraryDependencies += "io.github.mvillafuertem" %% "mdoc-modifier-plantuml" % "0.1"

How use

Only add this, that's all

scala mdoc:plantuml:modules/mdoc-modifier-docs/src/main/resources/result0:png

@see http://plantuml.com/sitemap-language-specification

@startuml

participant Bob
actor Alice
 
Bob -> Alice : hello
Alice -> Bob : Is it ok?

@enduml

modules/docs/src/main/resources/result0.png

Support SVG

modules/docs/src/main/resources/result0.svg

Troubleshooting 😱

Can not find Graphviz

  • Install Graphviz

more information see http://plantuml.com/es/graphviz-dot

  • Add this line to diagram
!pragma layout smetana

more information see http://plantuml.com/es/smetana02

@startuml

!pragma layout smetana
class Foo1

Foo1 --> Foo2
Foo1 --> Foo3
Foo1 ---> Foo4 : test 4
Foo1 ----> Foo5 : test 5

@enduml

modules/docs/src/main/resources/result1.svg modules/docs/src/main/resources/result2.svg

modules/docs/src/main/resources/aws-simple-data-lake-architecture.svg

Choosing colors

modules/docs/src/main/resources/colors-lightgreen.svg

modules/docs/src/main/resources/colors-lightblue.svg