-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is there a need to match diagram name against a hardcoded list, rather than forwarding the argument to the kroki server? #17
Comments
I am also looking in to this. I tired to look if kroki has a api for it but I can't find any. |
i'm referring to these lines - kroki/sphinxcontrib/kroki/kroki.py Lines 19 to 64 in 2665ddf
seems to me the ALIASES = {
"bob": "svgbob",
"c4": "c4plantuml",
"c4puml": "c4plantuml",
"dot": "graphviz",
"dsl": "structurizr",
"er": "erd",
"gv": "graphviz",
"iuml": "plantuml",
"pu": "plantuml",
"puml": "plantuml",
"uxf": "umlet",
"vg": "vega",
"vgl": "vegalite",
"vl": "vegalite",
"wsd": "plantuml",
}
def diagram_name(name: str) -> str:
return ALIASES.get(name, name) |
Yea I agree. I got back from kroki that we can use https://kroki.io/health to get a list of available diagrams. I will see if I can get a PR together |
what it says on the tin.
If checking the value against a hardcoded list wasn't required, then new diagram types would not need to be manually added (and no issues with absent maintainers either...)
The 'checking' mechanism could still be used for known aliases, but fall back to a direct pass through
The text was updated successfully, but these errors were encountered: