jsonschema2md icon indicating copy to clipboard operation
jsonschema2md copied to clipboard

Description extension not working if dot in username

Open sekistner opened this issue 4 years ago • 1 comments

https://github.com/adobe/jsonschema2md/blob/2a0f6f8e9f0d3454dc330ba9eb2fef7ebdf50875/lib/formatInfo.js#L67

If your user has a dot in it like j.doe then it will cut it off at j and looks for the path with j.description.md at the end and fails with Error: ENOENT: no such file or directory, open '/Users/j.description.md'.

This way the descriptions extension are not imported.

sekistner avatar Oct 18 '21 14:10 sekistner

You might want to try this with this tweaked regex:

schema[s.filename].replace(/\.[^.]*$/, '.description.md'), 

If it works for you, feel free to open a PR

trieloff avatar Oct 19 '21 06:10 trieloff