Injecting MD into output MD
TomerG711 opened this issue · comments
Is your feature request related to a problem? Please describe.
I have a general OpenAPI.yml, which references smaller REST path YML files. In the general YML, I want to insert before and after every path some MD files (Always one before and one after).
Today Widdershins allow us to include other MD files but only using the include
header in markdown, which throws everything in the end of the markdown file.
What I want, is something like: https://stackoverflow.com/questions/4779582/markdown-and-including-multiple-files.
Describe the solution you'd like
Allowing include MD files anywhere in the markdown.
Describe alternatives you've considered
-
Adding comments to the general OpenAPI.YML of MD file names (before and after each path) to inject with some script - won't work since Widdershins does not transform comments to the output MD (If we could simply transform '#' to '' it'd be great).
-
Using OpenAPI extensions to do something like: x-before-md-goes-here: file_name.md (https://swagger.io/docs/specification/openapi-extensions/). Does not work since Widdershins seems to ignore root level extensions (even though those are legal).
-
Using OpenAPI '$ref' syntax - OpenAPI allow us to reference MD files (although not officially). However, if I want Widdershins to resolve '$ref', it looks for YML files only, so when it finds it's MD file it'll fail.
Essentially, I just need some way to put a place holder in my OpenAPI input file, that will survive Widdershins into the output markdown file...
See PR #327 for a couple of proposed approaches.