This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// not the most elgant way but it works | |
// in the console post the function below and call changeSwagger("http","localhost:5050","/my_path/) | |
function changeSwagger (scheme,host,path) { | |
var newspec = ui.spec().toJSON().resolved | |
newspec.scheme = [scheme] || newspec.scheme | |
newspec.host = host || newspec.host | |
newspec.basePath = path || newspec.basePath | |
ui.getStore().dispatch({type:'set_scheme',payload: {scheme: newspec.scheme[0]}}) |