-
Notifications
You must be signed in to change notification settings - Fork 68
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
Allow supporting multiple BeforeScript and AfterScript configs #81
Comments
Zhomart
added a commit
to Zhomart/http-swagger
that referenced
this issue
Jan 13, 2023
Summary: Previsouly this code would allow only a single script to run: ``` r.Get("/swagger/*", httpSwagger.Handler( httpSwagger.BeforeScript("console.log('before 1')"), httpSwagger.BeforeScript("console.log('before 2')"), httpSwagger.URL("http://localhost:1323/swagger/doc.json"), //The url pointing to API definition )) // Only 'before 2' will be printed ``` Now both scripts are run: ``` 'before 1' 'before 2' ``` This improves behavior of BeforeScript and AfterScript. If users want to provide multiple scripts, they are forced to combine them using strings. Closes swaggo#81 Test Plan: Updated existing example and tests. Added new test TestMultipleScripts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently these configs just replace the previous script, example:
It makes hard to add multiple configuration scripts by forcing joing strings.
The text was updated successfully, but these errors were encountered: