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(SwaggerValidation): Allow hierarchy in paths #822

Merged
merged 2 commits into from
Nov 11, 2020

Conversation

jeredmasters
Copy link
Contributor

Regex used to test for duplicate paths uses greedy matching causing valid RESTful hierarchy to be
flagged as an error:

fix #821

Regex used to test for duplicate paths uses greedy matching causing valid RESTful hierarchy to be
flagged as an error:

fix FoalTS#821
@jeredmasters
Copy link
Contributor Author

I am unable to view the security/synk test suite to check the error, however i assume it is unrelated to the changes here.

@codecov-io
Copy link

Codecov Report

Merging #822 (cac7f64) into master (49767ec) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #822      +/-   ##
==========================================
- Coverage   99.62%   99.60%   -0.02%     
==========================================
  Files          90       94       +4     
  Lines        1589     1766     +177     
  Branches      335      425      +90     
==========================================
+ Hits         1583     1759     +176     
- Misses          6        7       +1     
Impacted Files Coverage Δ
packages/core/src/express/create-app.ts 100.00% <100.00%> (ø)
...kages/core/src/openapi/create-open-api-document.ts 100.00% <100.00%> (ø)
packages/core/src/core/service-manager.ts 98.88% <0.00%> (-1.12%) ⬇️
packages/core/src/core/index.ts 100.00% <0.00%> (ø)
packages/core/src/sessions/session.ts 100.00% <0.00%> (ø)
packages/core/src/core/routes/utils.ts 100.00% <0.00%> (ø)
packages/core/src/express/not-found.ts 100.00% <0.00%> (ø)
packages/core/src/core/http/contexts.ts 100.00% <0.00%> (ø)
packages/core/src/sessions/token.hook.ts 100.00% <0.00%> (ø)
... and 35 more

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 2015ab4...cac7f64. Read the comment docs.

@LoicPoullain LoicPoullain self-requested a review November 11, 2020 14:59
@LoicPoullain LoicPoullain added this to Work In Progress in Issue tracking via automation Nov 11, 2020
@LoicPoullain LoicPoullain changed the base branch from master to v1-11-2 November 11, 2020 15:18
Copy link
Member

@LoicPoullain LoicPoullain left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

});
throw new Error('Expected an exception here');
} catch (err) {
notStrictEqual(err.message, 'Expected an exception here');
Copy link
Member

Choose a reason for hiding this comment

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

I added this line here. Otherwise the test was always successful because all errors (thrown in line 40 or line 44) were caught.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah true, thanks

@LoicPoullain LoicPoullain merged commit c3e454f into FoalTS:v1-11-2 Nov 11, 2020
Issue tracking automation moved this from Work In Progress to Done / Closed This Release Nov 11, 2020
@LoicPoullain LoicPoullain mentioned this pull request Nov 11, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Issue tracking
  
Done / Closed This Release
Development

Successfully merging this pull request may close these issues.

Swagger path validation error
3 participants