Fix Tauri Config Generator
lorenzolewis opened this issue · 2 comments
The generator that builds https://beta.tauri.app/2/reference/config/ is currently broken. Would like to switch over to something like https://github.com/adobe/jsonschema2md or similar so that we don't need to maintain the current generator at https://github.com/tauri-apps/tauri-docs/blob/next/src/plugins/configGenerator.ts
I've tried both, barely, just to play around https://github.com/adobe/jsonschema2md and https://github.com/BrianWendt/json-schema-md-doc.
The issue with jsonschema2md is that it creates multiples md files: adobe/jsonschema2md#531 and I had to add an $id
field to the original schema. Plus it's made to schema 2019-09
. (I know next to nothing about json schema)
Concatenating all the contents to the same file the output will have broken links/anchors, a infinitely long nav sidebar, a mess overall.
json-schema-md-doc worked better out of the box, it supports solely draft-7
. But it throws a bunch of 'unknown prop type' warnings on option types like ['string', 'null'], [ 'array', 'null' ].
. Output still broken tho but at first glance seems better, yet incomplete. Note that is a way smaller project, it's only a js file.
For reference:
minimal code for adobe/jsonschema2md: vasfvitor@c54ded5
minimal code for json-schema-md-doc: vasfvitor@7c5c12f
In both it's commited the original config.md
file to compare with the generated config.md
output
Fixed by #1713 , although there are future enhancements that we would like to put in place for a more streamlined UX as noted in that PR.