jsonschema2md
jsonschema2md copied to clipboard
Allow output to be configurable
Looking at things like the header section I can see how it would be useful once it's clear what each heading means (It took me a few minutes to work out how "Abstract" and "Extensible" are defined for example).
It could be useful for those looking for simple output, to allow things like the header to be configurabally turned off.
I can see how a number of other elements may want to be configurable, so I'd suggest something like a jsonschema2md.rc file.
{
"config": {
"sections": {
"header": false
}
},
"meta": {
"authors": [
{
"name": "Mr Test"
}
]
}
}
or for alternate header layout, assuming the current layout is "table"...
{
"config": {
"sections": {
"header": {
"layout": "list"
}
}
}
}
Does this sound reasonable?
If so, I'll begin work on making this happen.
Yes, that sounds reasonable. I'd probably use something like https://www.npmjs.com/package/pkg-conf to enable configurations in package.json.
I can see a use case for people wanting to use jsonschema2md without having their main code be javascript. I don't know if using that package and configuring using package.json prohibits that.
It can also see a later use case of having specific config changes in folders, hence suggesting having your own .rc type file.
However in the absense of known or documented use cases that require such today, I'm happy to take the pragmatic approach.