Skip to content

Use open-api plugin settings instead of global ones - #211

Open
w666 wants to merge 1 commit into
docmd-io:mainfrom
w666:fix-210-openapi-download
Open

Use open-api plugin settings instead of global ones#211
w666 wants to merge 1 commit into
docmd-io:mainfrom
w666:fix-210-openapi-download

Conversation

@w666

@w666 w666 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor
  • This is to respect setting download and display download link for api spec
  • Use the same URL as a provided to plugin when generate download URL, so it does not try to download with a page prefix

Detailed description:

In my example I have the following structure:

docs-root
    |--API
    |     |-- my-api.md - this is where I render my spec file 
    |
    |-- api-specs
           |--- my-spec.yaml -- this is actual spec

I provide relative path in MD page, for example:

openapi
./api-specs/my-spec.yaml

this page has URL example.com/doc/api/my-api/, so download link is example.com/doc/api/my-api/my-spec.yaml which is not correct, it does not match the path. Instead it should be example.com/doc/api-specs/my-spec.yaml

image

Fixes #210

Type of change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

 - This is to respect setting `download` and display download link for
   api spec
 - Use the same URL as a provided to plugin when generate download URL,
   so it does not try to download with a page prefix

Close docmd-io#210
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

Successfully merging this pull request may close these issues.

[Bug]: Download button in OpenAPI plugin is not displayed regardless of the settings

1 participant