jsonschema2md icon indicating copy to clipboard operation
jsonschema2md copied to clipboard

Markdown file does not get generated when a reference is used

Open savasp opened this issue 4 years ago • 4 comments

What did you do

I have two simple schemas: foo and bar. foo references bar via a property called bar. There is a $ref in the declaration of that property.

What did you expect to happen

The links in all generated documents should be valid.

What happened

When the markdown files are generated, the foo.md file contains a link to foo-properties-bar.md which doesn't exist.

Do you have example files:

I am attaching a zip with the schema files and the generated markdown files.

test.zip

savasp avatar Oct 09 '20 20:10 savasp

I believe that I'm getting something similar in that referenced schemas are not being output. I'm actually getting a message that states that the URL cannot be resolved, when I curl that URL the CLI can't find, it downloads as expected.

jeffpatton1971 avatar May 21 '21 19:05 jeffpatton1971

jsonschema2md does not download referenced schema files. If you want a schema file to be included, download it and store it with the remaining schema files in the folder that jsonschema2md processes.

trieloff avatar May 25 '21 13:05 trieloff

Lars,

Ok, so all the files are locally available, and it appears the files that it's failing on are not getting processed, but I will double check to make sure. would there be a possibility to perhaps suppress those errors that would be expected since the tool doesn't follow ref urls? also, just to let you know, this is really good work and super appreciated.

Thanks!


From: Lars Trieloff @.> Sent: Tuesday, May 25, 2021 8:36 AM To: adobe/jsonschema2md @.> Cc: Jeffrey Patton @.>; Comment @.> Subject: Re: [adobe/jsonschema2md] Markdown file does not get generated when a reference is used (#254)

jsonschema2md does not download referenced schema files. If you want a schema file to be included, download it and store it with the remaining schema files in the folder that jsonschema2md processes.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fadobe%2Fjsonschema2md%2Fissues%2F254%23issuecomment-847876789&data=04%7C01%7Cjeffrey%40patton-tech.com%7Cd921ef1137e54bd3c29008d91f82256b%7C1625f76093884a6aa893730ebf9dcd4f%7C0%7C0%7C637575466117049188%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=K4LWRyzeY3IwFsWA7epokdCpPdBTXFoY42tJ7PwXjNU%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAJDC67SFBIFA5OBG77PIXTTPORW7ANCNFSM4SKQDLUQ&data=04%7C01%7Cjeffrey%40patton-tech.com%7Cd921ef1137e54bd3c29008d91f82256b%7C1625f76093884a6aa893730ebf9dcd4f%7C0%7C0%7C637575466117059149%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2rjBsnMy%2BtvlBCgnM%2Fm5yFdeye8OS8LwS7AdNyWO6tQ%3D&reserved=0.

jeffpatton1971 avatar May 25 '21 13:05 jeffpatton1971

I'd take a PR that turns these errors into warnings, but I can't say how much work it would be.

trieloff avatar May 25 '21 13:05 trieloff