Open rrarunan opened 10 years ago
@rrarunan
Good point. The issue is you can't tell from AST. You can do some heuristic and assume that when there is a defined model and a payload 100% matches you can use the model. But then you would be in the opposite problem of having models links everywhere even where they weren't.
With that being said I am not against implementing the heuristics and I will be happy to merge such a PR.
Yup, I was thinking the same thing, it would be great when you have the Traits
done. Because, the use case for this one was that I was appending random body payload using a simulator in the api blueprint so that my mock server would be dynamic. So, now when compiling back to MD after changing the JSON, I should either generate the body twice or have some kind of heuristic based approach, it could be an option maybe.. I would rather have the links and a smaller MD file than having my body be replicated in several places. Thanks!
Initial MD:
Snowcrash Parsed JSON:
Matter Compiler -> MD again
Shouldn't it be a link/reference again?
[Star][]