docs: def _handler_swagger_ui(self, request, spec, version):
          """
          ---
          parameters:
            - name: spec
              in: query
              type: string
            - name: version
              in: query
              type: integer
              enum: [2,3]
          """
          version = version or self._version_ui
          if self._spec_url:
              spec_url = self._spec_url
          else:
              spec_url = request.url.with_path(self['swagger:spec'].url())
              proto = request.headers.get(hdrs.X_FORWARDED_PROTO)
              if proto:
                  spec_url = spec_url.with_scheme(proto)
              if isinstance(spec, str):
                  spec_url = spec_url.with_query(spec=spec)
              elif len(self._swagger_data) == 1:
                  for basePath in self._swagger_data:
                      spec_url = spec_url.with_query(spec=basePath)
              else:
                  spec_url = spec_url.with_query(spec='/')
              spec_url = spec_url.human_repr()
          return web.Response(
              text=ui.rend_template(spec_url,
                                    prefix=self._swagger_ui,
                                    version=version),
              content_type='text/html')