YAML Diagrams: accept YAML diagram as sub-diagram or embedded diagram

+1 vote
asked Jan 16, 2021 in Wanted features by The-Lu (74,900 points)

Hello PlantUML team,

To continue with sub-diagram or embedded diagram feature:

  • Could you accept YAML diagram as sub-diagram or embedded diagram?

Here is an example:

@startuml
file n [
Example of YAML file:
{{yaml
fruit: Apple
size: Large
color:
 - Red
 - Green
}}
]
@enduml

[same thing also for wire-diagram]

Thanks for your support,
Regards,
Th.

1 Answer

0 votes
answered Jan 17, 2021 by plantuml (295,800 points)
selected Jan 17, 2021 by The-Lu
 
Best answer
Thanks for the report!

This should be fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server
commented Jan 20, 2021 by Martin (9,120 points)

@Plantuml, I'm confused...it doesn't look fixed in the online server...

Looking further, it works if you make very minor adjustments, for example removing the : or even putting a space in front of it as follows:

(Th was very unlucky with their choice of example!  (or very lucky to find the exception, depending on how you view it)).

commented Jan 20, 2021 by The-Lu (74,900 points)

Hello Martin,

If fact, there is no issue on the PlantUML program (jar) side, you can test with another PlantUML server or a local PlantUML server or a local jar version.

The observed issue is due to the cache, especially on the server side, or less likely on your side (on your browser)...

I made the same remarks when I started, see:

It may be a cache issue for older examples
...

Perhaps the PlantUML [online server] caches some result from old defect

[from https://forum.plantuml.net/11143/data-structures-json-access-json-data-directly-redirection?show=11168#c11168]

If that can help,
Regards,
Th.

commented Jan 20, 2021 by Martin
You're right; doh; not sure how I didn't think of that.  Thanks Th.
commented Jan 20, 2021 by The-Lu (74,900 points)

No problem, we often forget the caches mechanism here and there ... wink
And I also came across this behaviour..
Good test,
Regards,
Th.

...