LiveRamp / reslang

A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23 stars 7 forks source link

diagram generation error (defective .dot file) #80

Closed j-q-arnold closed 4 years ago

j-q-arnold commented 4 years ago

I have reslang that generates diagrams. One diagram omitted actions from a subresource. Investigating that, I believe the generated .dot file is defective. I'll attach the files.

./reslang /Users/jaarno/code/api-specs/segment-delivery --diagram segmentDelivery \
    --stdout >/Users/jaarno/code/api-specs/segment-delivery/generated-sources/segmentDelivery.dot

I tried a rules file with a larger maxResourceDepth, but that didn't change anything. So I started looking at the .dot file, and I think it is the problem. Issues I noticed:

I had to rename the files to make them acceptable attachments. Remove the .txt suffixes. The segment-delivery.reslang is the top-level file. See segmentDelivery-corrected.dot for a working output file.

segment-delivery.reslang.txt segmentDelivery.dot.txt types.reslang.txt diagrams.reslang.txt segmentDelivery-corrected.dot.txt

liveandrew commented 4 years ago

generates correctly on your example now. the issue was that i wasn't using a fully scoped name for drawing the arrows so it was getting confused!

j-q-arnold commented 4 years ago

I tried the latest reslang. The node names are fixed, but the spurious "} are still present. See the last bullet item in the original issue description.

Reopening this issue.

liveandrew commented 4 years ago

ah, ok, having a look

liveandrew commented 4 years ago

please try again, i've found a spurious }" string in the code and removed it

j-q-arnold commented 4 years ago

Better now. Thanks.