Skip to content

Conversation

robbieaverill
Copy link
Contributor

Description

When building pages, the downloadUrl configuration property was previously only available to 'info' pages. It is now available to all types of pages.

#1093

Motivation and Context

I want to add a "download schema" option to individual API endpoint pages. It is currently not possible, as the config property is only provided to info pages.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 920982f):

https://docusaurus-openapi-36b86--pr1094-w0pabhec.web.app

(expires Wed, 26 Mar 2025 15:40:39 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata
Copy link
Member

Hi @robbieaverill, can you provide an example of how you plan on using this feature? Any upside to this approach vs using the Export theme component?

https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/main/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/Export/index.tsx

@robbieaverill
Copy link
Contributor Author

Hey @sserrata, thanks for the reply. I'd like to use that component on individual API pages. At the moment, the downloadUrl configuration is only provided to "info" pages:

if (item.type === "info") {
  if (downloadUrl) {
    item.downloadUrl = downloadUrl;
  }
}

This PR proposes to add it to all items (pages), not just "info" pages, then I can use the Export component on all pages.

@sserrata sserrata merged commit 2500d35 into PaloAltoNetworks:main Feb 26, 2025
9 checks passed
@robbieaverill
Copy link
Contributor Author

Thanks @sserrata

@robbieaverill robbieaverill deleted the download-url-for-all branch February 26, 2025 20:16
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.

2 participants