You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I cannot get Widdershins to pick up and use my custom template. I'm sure I must be doing something wrong, but it's hard to diagnose when there is no apparent confirmation or otherwise that it is picking up a user template, because the default behavior is to use the standard template.
I'm running Widdershins CLI on Mac with variations of this command:
I've tried './mytemplates' instead of 'mytemplates', as well as trying the absolute path obtained through $realpath, but it makes no difference.
I have a sub-directory called mytemplates and in that I have copied the contents of openapi3 from the Widdershins template sub-directory and I've edited the main.dot file with a simple edit to test if it's picking up this version and not the default version. My change is to remove the following line of Markdown which appears in the header of the output file.
> Scroll down for {{? data.header.language_tabs.length}}code samples, {{?}}example requests and responses.{{? data.header.language_tabs.length}} Select a language for code samples from the tabs above or the mobile navigation menu.{{?}}
When I run the command, the deleted Markdown still appears in the output file, indicating that it is not processing my custom main.dot.
I have no indication of the cause of the error:
Is it not finding my user template directory, maybe because I have specified it incorrectly?
Is there some other reason why it is ignoring my main.dot?
I am pretty sure this must be an error on my part and not in Widdershins, but I'm running out of ideas. And at the very least, it would be good to have some diagnostics support, e.g. if the -u option is used then it should report an error if it can't find or can't process the custom template.
- I have checked that my input document is valid OpenAPI 2.0/3.0.x or AsyncAPI 1.x
I have resolved the issue by pointing to the openapi3 sub-directory, not the main templates directory, i.e. command-line should be as follows: widdershins 'swagger.yaml' -o 'openapi.md' -u 'mytemplates/openapi3'
However, I think the issue I raised is still valid. A small change to the documentation could save users hours of lost time, and others might not be as persistent as me. Thks :-)
Describe the bug
I cannot get Widdershins to pick up and use my custom template. I'm sure I must be doing something wrong, but it's hard to diagnose when there is no apparent confirmation or otherwise that it is picking up a user template, because the default behavior is to use the standard template.
I'm running Widdershins CLI on Mac with variations of this command:
widdershins 'swagger.yaml' -o 'openapi.md' -u 'mytemplates'
I've tried
'./mytemplates'
instead of'mytemplates'
, as well as trying the absolute path obtained through$realpath
, but it makes no difference.I have a sub-directory called
mytemplates
and in that I have copied the contents ofopenapi3
from the Widdershins template sub-directory and I've edited themain.dot
file with a simple edit to test if it's picking up this version and not the default version. My change is to remove the following line of Markdown which appears in the header of the output file.> Scroll down for {{? data.header.language_tabs.length}}code samples, {{?}}example requests and responses.{{? data.header.language_tabs.length}} Select a language for code samples from the tabs above or the mobile navigation menu.{{?}}
When I run the command, the deleted Markdown still appears in the output file, indicating that it is not processing my custom
main.dot
.I have no indication of the cause of the error:
I am pretty sure this must be an error on my part and not in Widdershins, but I'm running out of ideas. And at the very least, it would be good to have some diagnostics support, e.g. if the
-u
option is used then it should report an error if it can't find or can't process the custom template.To Reproduce
Steps to reproduce the behavior:
widdershins 'swagger.yaml' -o 'openapi.md' -u 'mytemplates'
mytemplates/openapi3
withmain.dot
edited as described above.openapi1.md
still contains the Markdown "Scroll down for..." (as above)Expected behavior
Output file
openapi1.md
should not contain the Markdown "Scroll down for..." (as above)Screenshots
n/a
Versions:
Additional context
n/a
The text was updated successfully, but these errors were encountered: