Openapi validation link on service stack service swagger (openapi) ui

I’m seeing this at the bottom of the swagger page of a service stack service (openapi, sstack 4.5.8) …

It seems related to the fact that our openapi definition URL is protected by basic authentication, so it cannot be parsed by api.

Does this api endpoint support basic auth ? if yes, do you provide a way to pass credentials to it ?
If it’s not the case … Is it possible to hide this validation link in the ui ?

thank you

Swagger UI has set of parameters you can change to customize UI look and feel. To disable validation you need to pass validatorUrl: null when Swagger UI is created on index.html page. Basically it’s defined as

  window.swaggerUi = new SwaggerUi({
    url: url,
    dom_id: "swagger-ui-container",
    supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
    showRequestHeaders: false,
    showOperationIds: false

So you need to add here to parameters validatorUrl: null.

To do this, you can override index.html page, which is contained as embedded resource in ServiceStack.Api.OpenApi assembly. You need to place it to /swagger-ui/index.html location of the web site. Here is detailed description about overriding swagger resources. The original index.html page content you can get from ServiceStack.Api.OpenApi sources