Closed cgoguyer closed 3 years ago
Hey @cgoguyer
Could you please describe your environment? which version are you using? are you using https://kroki.io or a self-hosted version? in this case, which version of Kroki are you running? Are you using the Asciidoctor Kroki extension from Node? from the browser?
Also could you please describe what exactly does not work? Do you have any error? Is something missing from the diagram?
Here's what I get using the following definition on https://kroki.io
@startuml C4_Elements
!include puml/plantuml-stdlib/C4.puml
!include puml/plantuml-stdlib/C4_Context.puml
!include puml/plantuml-stdlib/C4_Container.puml
Person(admin, "Administrator")
System_Boundary(c1, "Sample System") {
Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", "Allows users to compare multiple Twitter timelines")
}
System(twitter, "Twitter")
Rel(admin, web_app, "Uses", "HTTPS")
Rel(web_app, twitter, "Gets tweets from", "HTTPS")
@enduml
Hello @Mogztter ,
I'm using "asciidoctor-kroki": "^0.12.0" with nodejs v10.24.0. and with https://kroki.io for testing from console. But I have the same issue using asciidoctor-vscode plugin in vscode with a local docker image of kroki when I try to generate documentation including plantuml-stdlib C4-Plantuml as local file without internet connection. The issue is only when using local include.
And yes, both code works in https://kroki.io.
I'm using "asciidoctor-kroki": "^0.12.0" with nodejs v10.24.0. and with kroki.io for testing from console. But I have the same issue using asciidoctor-vscode plugin in vscode with a local docker image of kroki when I try to generate documentation including plantuml-stdlib C4-Plantuml as local file without internet connection. The issue is only when using local include.
I got no error from nodejs and the generated URL is returning: Error 1036 Invalid request rewrite:
@cgoguyer The generated URI is way too long, currently the max URI length is 4000. I believe that you have C4 files locally? I would recommend to use the following syntax:
@startuml C4_Elements
!include <c4/C4>
!include <c4/C4_Context>
!include <c4/C4_Container>
Person(admin, "Administrator")
System_Boundary(c1, "Sample System") {
Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", "Allows users to compare multiple Twitter timelines")
}
System(twitter, "Twitter")
Rel(admin, web_app, "Uses", "HTTPS")
Rel(web_app, twitter, "Gets tweets from", "HTTPS")
@enduml
Since C4 is now available in the PlantUML stdlib it will be resolved by the Kroki server. In other words, you don't need to checkout C4 files locally.
You will also send a smaller payload to the Kroki server (and as a result the generated URI will be smaller).
@Mogztter , yes I'm using files locally. Ok it works with embedded libs.
New version of C4-PlantUML (plantuml-stdlib /C4-PlantUML ) is not working anymore within asciidoctor-kroki with local C4 puml files. It was working fine with the previous version (https://github.com/RicardoNiepel/C4-PlantUML).
Does not work (plantuml-stdlib = path to to latest C4 puml)
Works (RicardoNiepel = old version of C4 puml)