Swagger API service problem when using HTTPS URL - XData SwaggerUI - XDataServerModule

Are you able to debug your server? In XData.SwaggerUI.Service.Internal you can see this code:

  SwaggerUrl := TXDataOperationContext.Current.Handler.AbsoluteUrl('openapi/swagger.json') + Query;
  JS := SwaggerUICode;
  JS := StringReplace(JS, '%URL%', SwaggerUrl, []);

You can see that the SwaggerUrl is provided via a construction using AbsoluteUrl method.
And AbsoluteUrl is this:

function TXDataRequestHandler.AbsoluteUrl(const RelativeUrl: string): string;
var
  Scheme: string;
  Authority: string;
  Path: string;
begin
  Scheme := Request.Uri.Scheme;
  Authority := Request.Uri.Authority; // Module.BaseUri.Authority,
  Path := Module.BaseUri.OriginalPath;

  Result := TXDataUtils.CombineUrlFast(
    Format('%s://%s%s', [Scheme, Authority, Path]),
    RelativeUrl
  );

  XModule.DoGetAbsoluteUrl(Scheme, Authority, Path, RelativeUrl, Result);
end;

Unless you have the OnGetAbsoluteUrl event set, you can see that it gets the scheme directly from the request (not from BaseUrl). Thus if your server is somehow being accessed via HTTP (not HTTPS) then it would built the URL to swagger.json file using HTTP. It's hard to tell what's going on from our side, it should be working fine, it would be good if you could do deeper investigation base on the information I just provided.