Closed OSA413 closed 2 years ago
Added the ability to do customJsStr to the options:
Released: https://github.com/scottie1984/swagger-ui-express/releases/tag/4.4.0
Close from now.
Please update TypeScript version as well.
Typescript module isn’t maintained by myself
Moved from https://github.com/nestjs/swagger/issues/1881
Is your feature request related to a problem? Please describe it
I've been trying to implement an SSO (OAuth2) login on the API page opening, unfortunately I only found how to add it to headers, so that's not exactly what I needed. After some search I found that it's possible to customize page with
customCss
,customCssUrl
, andcustomJs
which with some effort should help me solve my issue.Unfortunately, it "accepts absolute or relative path. Value must be the public url of the js file". So I'll have to write a pure JS script and put it somewhere on backend to accomplish my goal.
Describe the solution you'd like
For example, it can accept a function that will be converted into a JS file. Or it can accept a function and run it directly after the API page is loaded.
Or probably improve the feature as it was done with customCss https://github.com/scottie1984/swagger-ui-express/pull/9