Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ScriptSrcs to add extra scripts URLs to load #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 13, 2023

  1. Add ScriptSrcs to add extra scripts URLs to load

    Summary: This allows importing plugins from local and external hosts.
    
    ```
    	r.Get("/swagger/*", httpSwagger.Handler(
    		httpSwagger.ScriptSrc("/static/swagger-helper.js"),
    		httpSwagger.ScriptSrc("https://unpkg.com/swagger-ui-plugin-disable-try-it-out-without-servers@1.0.0/build/index.js"),
    		httpSwagger.Plugins([]string{"DisableTryItOutWithoutServersPlugin"},
    		httpSwagger.URL("http://localhost:1323/swagger/doc.json"), //The url pointing to API definition
    	))
    ```
    
    Closes swaggo#83
    
    Test Plan: Updated existing tests. Added example in example/go-chi/
    Zhomart committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    39c92d8 View commit details
    Browse the repository at this point in the history