Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. c.InjectJavaScript(thisAssembly, "MyProject.Scripts.swagger-plugins.js");
  2.  
  3. const DisableTryItOutPlugin = function() {
  4. return {
  5. statePlugins: {
  6. spec: {
  7. wrapSelectors: {
  8. allowTryItOutFor: () => () => false
  9. }
  10. }
  11. }
  12. }
  13. }
  14.  
  15. const DisableAuthorizePlugin = function () {
  16. return {
  17. wrapComponents: {
  18. AuthorizeBtn: () => () => null
  19. }
  20. }
  21. }
  22.  
  23. SwaggerUI({
  24. plugins: [
  25. DisableTryItOutPlugin,
  26. DisableAuthorizePlugin
  27. ]
  28. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement