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
feat: Add resources/info endpoint (DEV-792) #2309
Conversation
66f32fa
to
d40183d
Compare
8f1a3f8
to
fdb7ab8
Compare
d445876
to
e83c808
Compare
Codecov ReportBase: 86.68% // Head: 86.38% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2309 +/- ##
==========================================
- Coverage 86.68% 86.38% -0.30%
==========================================
Files 250 264 +14
Lines 28252 28417 +165
==========================================
+ Hits 24490 24549 +59
- Misses 3762 3868 +106
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
9247db4
to
1a19913
Compare
c0c5574
to
c59ce47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is a good pattern to separate domain entities from DTOs but it is a pattern we haven't used so far. So, I would prefer to document it if we go this way in the future.
In general, documentation (also for end users) is missing. Could you add some?
And, we already discussed it, I totally agree that we don't need docstrings if a method name says everything. But there are a lot of methods and case classes doing more than the signature states, so it would be good to have docstrings there (especially for params).
webapi/src/it/scala/org/knora/webapi/slice/resourceinfo/api/LiveIriConverterSpec.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/messages/StringFormatter.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/routing/v2/ResourcesRouteV2.scala
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/slice/resourceinfo/domain/IriConverter.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/slice/resourceinfo/repo/LiveResourceInfoRepo.scala
Outdated
Show resolved
Hide resolved
.../src/test/scala/org/knora/webapi/slice/resourceinfo/api/SpyLiveRestResourceInfoService.scala
Outdated
Show resolved
Hide resolved
.../scala/org/knora/webapi/store/triplestore/upgrade/plugins/ApplyUpgradePluginToTestData.scala
Show resolved
Hide resolved
webapi/src/test/scala/org/knora/webapi/slice/resourceinfo/repo/TestResourceInfoRepo.scala
Outdated
Show resolved
Hide resolved
…dProjectFromHeader method
…s this is handled by the RestResourceInfoService itself
webapi/src/it/scala/org/knora/webapi/slice/resourceinfo/api/IriConverterLiveSpec$.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/routing/v2/ResourcesRouteV2.scala
Show resolved
Hide resolved
webapi/src/test/scala/org/knora/webapi/slice/resourceinfo/repo/ResourceInfoRepoFake.scala
Show resolved
Hide resolved
…iConverterLiveSpec$.scala Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
✅ Linked to Story DEV-792 · DSP-API: Vitrocentre routes from salsah should also be implemented in DSP-API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's nice piece of code.
Http.collectZIO[Request] { case req @ Method.GET -> !! / "v2" / "resources" / "info" => | ||
(for { | ||
p <- getParameters(req) | ||
result <- restService.findByProjectAndResourceClass(p._1, p._2, (p._3, p._4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it looks OK, params are coming from method which is. just few lines below - easy to find out.
Issue Number: DEV-792
includes orderBy [creationDate|lastmodficationDate], and order [ASC|DESC].
Http Example request:
Pull Request Checklist
Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?