Add JS event that allows altering the base SwaggerUI options, so that I can add plugins, change layout, etc.

Comments

yce created an issue. See original summary.

yce’s picture

I've attached a patch for it.

Usage:

$(window).bind('swaggerUIFormatterOptionsAlter', function(event, options) {
  // Enable our custom plugin.
  options.plugins.push(MyCustomPlugin);
}
yce’s picture

Re-uploading with the proper encoding and newline character.

yce’s picture

  • balazswmann committed 207593c on 8.x-2.x authored by yce
    Issue #3006990 by yce: Allow altering the SwaggerUI options
    
  • balazswmann authored 7cbc7a7 on 8.x-2.x
    Merge pull request #5 from balazswmann/issue-3006990
    
    Issue #3006990 by...
balazswmann’s picture

Status: Active » Fixed

Thanks! Committed.

balazswmann’s picture

Status: Fixed » Closed (fixed)
arpadCsanyi’s picture

Backported the D8 patch to work with the D7 version of the swagger_ui_formatter.

mxr576’s picture

Thanks @arpadCsanyi.
Merged your patch to the latest 7.x-2.x dev branch and stable release is also coming in a few minutes.

subha1248’s picture

StatusFileSize
new3.43 MB
new30.21 KB

i Have made few changes on this module, please check and let me know your feedback.

subha1248’s picture