Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injecting MD into output MD #322

Open
TomerG711 opened this issue May 5, 2020 · 1 comment
Open

Injecting MD into output MD #322

TomerG711 opened this issue May 5, 2020 · 1 comment

Comments

@TomerG711
Copy link

TomerG711 commented May 5, 2020

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

@MikeRalphson
Copy link
Contributor

See PR #327 for a couple of proposed approaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants