widdershins
widdershins copied to clipboard
Added support for injecting MD files. Any extension starts with 'x-md…
…-' will be treated as md file path, and loaded into 'md_' property. The content of the MD file can be accessed in the templates.
This will allow us to create much more complex MD files, making Widdershins much more flexible.
@MikeRalphson I've made the changes you asked. I added support to loading MD everywhere extensions are allowed, according to: https://swagger.io/docs/specification/openapi-extensions/. Also made the field prefix configurable, and updated README.
@MikeRalphson Could you please take a look?
@TomerG711 thanks for your patience. I'm evaluating a slightly different solution whereby we simply recurse
through the input API definition (whether it is OpenAPI or AsyncAPI or anything else) and update the x-md-
(or whatever prefix is specified) extensions - using code similar to what you have in the PR now.
Regardless of which approach we go with, I think we would need to support fetch
ing of resources which are http(s)
links or are relative to API definitions loaded from a URL.
So should I add support for fetching remote resources or should I leave it for you with the other solution?