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

fix(binding-http): fill security scheme when baseURI defined #1244

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Feb 21, 2024

Found a bug when exposing things with a baseURI defined. I added a failing test to verify the correct behavior and avoid regression.

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.81%. Comparing base (450ebd9) to head (c283db9).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1244      +/-   ##
==========================================
+ Coverage   77.79%   77.81%   +0.01%     
==========================================
  Files          84       84              
  Lines       17484    17523      +39     
  Branches     1771     1781      +10     
==========================================
+ Hits        13602    13635      +33     
- Misses       3846     3853       +7     
+ Partials       36       35       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

LGTM

The only concern I had initially was whether it makes any difference to put
this.fillSecurityScheme(thing);

after the if else ... as it was before but I don't think this matters in this case.

@relu91
Copy link
Member Author

relu91 commented Feb 24, 2024

I reviewed the code and I can confirm that addEnpoint does not have a direct dependency on what fillSecurityScheme is doing. You can check the code and see that addEnpoint does not manipulate anything other than affordances objects inside the thing. I would say that it is safe to keep the code as proposed and it will increase readability (e.g. since security schemes are often coming before affordances the coder is less surprised to see them handled first).

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

Latest changes look good again 👍

@danielpeintner danielpeintner merged commit 6b333d6 into eclipse-thingweb:master Feb 26, 2024
12 checks passed
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

3 participants