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

refactor(core-api): put configuration into Joi context #3940

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

rainydio
Copy link
Contributor

@rainydio rainydio commented Aug 7, 2020

Summary

Transform schemas back into form that similar to 2.6. Now they can be referenced from core-api and used by other -api packages. The reason why createSchemas function existed was to set max allowed value that is read from settings for limit query parameter. Now it's set and referenced through Joi context.

Schemas are still exported into app.schemas, but they should be referenced directly. This requires updating all routes.

@codecov
Copy link

codecov bot commented Aug 7, 2020

Codecov Report

Merging #3940 into develop will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3940   +/-   ##
========================================
  Coverage    97.56%   97.57%           
========================================
  Files          629      629           
  Lines        14541    14540    -1     
  Branches      1730     1730           
========================================
  Hits         14187    14187           
  Misses         165      165           
+ Partials       189      188    -1     
Flag Coverage Δ
#functional 6.82% <0.00%> (+<0.01%) ⬆️
#integration 9.84% <100.00%> (-0.01%) ⬇️
#unit 95.73% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-api/src/schemas.ts 100.00% <100.00%> (ø)
packages/core-api/src/server.ts 100.00% <100.00%> (ø)
packages/core-p2p/src/network-monitor.ts 100.00% <0.00%> (+0.37%) ⬆️

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 640b9a1...4532a19. Read the comment docs.

@rainydio rainydio marked this pull request as ready for review August 7, 2020 19:15
@air1one air1one merged commit 0ff67a9 into develop Aug 10, 2020
@ghost ghost deleted the refactor/core-api/joi-context branch August 10, 2020 10:15
@ghost ghost removed the Status: Needs Review label Aug 10, 2020
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.

2 participants