docs: function(options) {
      options = options || {};
  
      if (options.defaultModelRendering !== 'model') {
        options.defaultModelRendering = 'schema';
      }
  
      if (!options.highlightSizeThreshold) {
        options.highlightSizeThreshold = 100000;
      }
  
      // Allow dom_id to be overridden
      if (options.dom_id) {
        this.dom_id = options.dom_id;
        delete options.dom_id;
      }
  
      if (!options.supportedSubmitMethods){
        options.supportedSubmitMethods = [
          'get',
          'put',
          'post',
          'delete',
          'head',
          'options',
          'patch'
        ];
      }
  
      if (typeof options.oauth2RedirectUrl === 'string') {
        window.oAuthRedirectUrl = options.redirectUrl;
      }
  
      // Create an empty div which contains the dom_id
      if (! $('#' + this.dom_id).length){
        $('body').append('<div id="' + this.dom_id + '"></div>') ;
      }
  
      this.options = options;
  
      // set marked options
      marked.setOptions({gfm: true});
  
      // Set the callbacks
      var that = this;
      this.options.success = function() { return that.render(); };
      this.options.progress = function(d) { return that.showMessage(d); };
      this.options.failure = function(d) { return that.onLoadFailure(d); };
  
      // Create view to handle the header inputs
      this.headerView = new SwaggerUi.Views.HeaderView({el: $('#header')});
  
      // Event handler for when the baseUrl/apiKey is entered by user
      this.headerView.on('update-swagger-ui', function(data) {
        return that.updateSwaggerUi(data);
      });
  
      // JSon Editor custom theming
       JSONEditor.defaults.iconlibs.swagger = JSONEditor.AbstractIconLib.extend({
        mapping: {
          collapse: 'collapse',
          expand: 'expand'
          },
        icon_prefix: 'swagger-'
        });
  
    }