You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The link to the OpenAPI document is displayed near the top of the info area. I believe this is done in ...src/core/components/info.jsx. Rendering appears to be determined on the field named "url". I could not chase where the contents of that field originates from. I'm reasonably sure it originates from the url parameter in SwaggerUIBundle({}). There are alternatives to the url parameter, and I wondered if one of them would prevent the link from being rendered. I experimented with configUrl, but the outcome was the same.
Here is a screen snapshot of the link, as outlined in a green box.
Desired Behavior
The link to the OpenAPI document is not rendered. That is, the url link shown in the above screen snapshot is not rendered.
The text was updated successfully, but these errors were encountered:
Hey @mikefidel! Sorry for the delay here, I knew this was going to take some work in the core code.
I've just merged #4330, which creates some new plug points that you can use to ditch the URL line, like so:
constHideInfoUrlPartsPlugin=()=>{return{wrapComponents: {InfoUrl: ()=>()=>null,InfoBasePath: ()=>()=>null,// this hides the `Base Url` part too, if you want that}}}
This will work starting in the next release of Swagger-UI.
Closing for now since this addresses the question pretty directly - feel free to reply if there's anything outstanding.
This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.
If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report.
Wish to know if there is a way to prevent the display of the OpenAPI specification URL link.
The sponsor's preference is not to show the URL, if that can easily be avoided. This is a non-critical, low priority request for support.
Configuration (index.html found in Dist folder)
Modifications to index.html found below:
Current Behavior
The link to the OpenAPI document is displayed near the top of the info area. I believe this is done in ...src/core/components/info.jsx. Rendering appears to be determined on the field named "url". I could not chase where the contents of that field originates from. I'm reasonably sure it originates from the url parameter in SwaggerUIBundle({}). There are alternatives to the url parameter, and I wondered if one of them would prevent the link from being rendered. I experimented with configUrl, but the outcome was the same.
Here is a screen snapshot of the link, as outlined in a green box.
Desired Behavior
The link to the OpenAPI document is not rendered. That is, the url link shown in the above screen snapshot is not rendered.
The text was updated successfully, but these errors were encountered: