You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in order to pass preset/plugins we need to add checking in jsTplString so it can push new functions to array
for (var attrname in customOptions) {
if(attrname == "presets" || attrname == "plugins"){
swaggerOptions[attrname].push(customOptions[attrname]);
}else{
swaggerOptions[attrname] = customOptions[attrname];
}
}
here's inject example
var SwaggerHmacAuth = function (system) {
return {
statePlugins: {
spec: {
wrapActions: {
setMutatedRequest: (oriAction, system) => (str) => {
// here, you can hand the value to some function that exists outside of Swagger UI
console.log('Here is my API definition', str, oriAction, system);
return oriAction(str); // don't forget! otherwise, Swagger UI won't update
},
},
},
},
};
};
let swaggerOptions = {
presets: [SwaggerHmacAuth],
};
The text was updated successfully, but these errors were encountered:
in order to pass preset/plugins we need to add checking in
jsTplString
so it can push new functions to arrayhere's inject example
The text was updated successfully, but these errors were encountered: