widdershins icon indicating copy to clipboard operation
widdershins copied to clipboard

Added support for injecting MD files. Any extension starts with 'x-md…

Open TomerG711 opened this issue 4 years ago • 4 comments

…-' 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.

TomerG711 avatar May 18 '20 11:05 TomerG711

@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.

TomerG711 avatar Jun 02 '20 18:06 TomerG711

@MikeRalphson Could you please take a look?

TomerG711 avatar Jun 09 '20 16:06 TomerG711

@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 fetching of resources which are http(s) links or are relative to API definitions loaded from a URL.

MikeRalphson avatar Jun 18 '20 11:06 MikeRalphson

So should I add support for fetching remote resources or should I leave it for you with the other solution?

TomerG711 avatar Jun 29 '20 21:06 TomerG711