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

Update multiple API example #224

Merged
merged 1 commit into from Sep 6, 2022
Merged

Update multiple API example #224

merged 1 commit into from Sep 6, 2022

Conversation

fzdy1914
Copy link
Contributor

@fzdy1914 fzdy1914 commented Aug 3, 2022

Describe the PR
Update the example to use NewHandler()

Relation issue
#197
#223

Additional context
Reason for the fix: swaggerFiles.Handler is one single instance and patching the Prefix twice will end up making the request from first prefix invalid.

@ubogdan
Copy link
Contributor

ubogdan commented Aug 3, 2022

Would you mind adding a unit test proving that CSS files are accessible after accessing the second API endpoint?

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #224 (791e433) into master (b9e926c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #224   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           98        98           
=========================================
  Hits            98        98           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9e926c...791e433. Read the comment docs.

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for now. We need an additional unit test, see above!

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ubogdan ubogdan merged commit c8d47d5 into swaggo:master Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants