code: def __send_api_file(self, file_name):
          
  
          file_name = join(self.app.static_folder, file_name)
  
          with codecs.open(file_name, 'r', 'utf-8') as file:
              data = file.read()
  
          # replaces the hard coded url by the current url.
          api_project = self.__read_api_project()
  
          old_url = api_project.get('url')
  
          # replaces the project's url only if it is present in the file.
          if old_url:
              new_url = request.url_root.strip('/')
              data = data.replace(old_url, new_url)
  
          # creates a flask response to send
          # the file to the browser
  
          headers = Headers()
          headers['Content-Length'] = getsize(file_name)
  
          response = self.app.response_class(data,
                                             mimetype=mimetypes.guess_type(file_name)[0],
                                             headers=headers,
                                             direct_passthrough=True)
  
          response.last_modified = int(getmtime(file_name))
  
          return response
docs: Send apidoc files from the apidoc folder to the browser.
          This method replaces all absolute urls in the file by
          the current url.
          :param file_name: the apidoc file.