-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add route for getting information for resources /v2/resources/info
includes orderBy [creationDate|lastmodficationDate], and order [ASC|DESC]. Http Example request: GET /v2/resources/info?resourceClass=http%3A%2F%2F0.0.0.0%3A3333%2Fontology%2F0001%2Fanything%2Fv2%23Thing&order=DESC&orderBy=creationDate HTTP/1.1 X-Knora-Accept-Project: http://rdfh.ch/projects/Lw3FC39BSzCwvmdOaTyLqQ Http Example response: { "resources": [ { "resourceIri": "http://rdfh.ch/0001/thing-with-pages", "creationDate": "2021-05-11T10:00:00Z", "lastModificationDate": "2021-05-11T10:00:00Z", "isDeleted": false }, { "resourceIri": "http://rdfh.ch/0001/0JhgKcqoRIeRRG6ownArSw", "creationDate": "2020-04-07T09:12:56.710717Z", "lastModificationDate": "2020-04-07T09:12:56.710717Z", "isDeleted": false }, ... ] }
- Loading branch information
Showing
34 changed files
with
1,068 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
webapi/src/it/scala/org/knora/webapi/slice/resourceinfo/api/LiveIriConverterSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.knora.webapi.slice.resourceinfo.api | ||
|
||
import org.knora.webapi.messages.StringFormatter | ||
import org.knora.webapi.slice.resourceinfo.domain | ||
import org.knora.webapi.slice.resourceinfo.domain.{InternalIri, IriConverter} | ||
import zio.test._ | ||
|
||
object LiveIriConverterSpec extends ZIOSpecDefault { | ||
|
||
def spec = suite("IriConverter")( | ||
test("should not convert the projectIri") { | ||
for { | ||
internal <- IriConverter.asInternalIri("http://project-iri") | ||
} yield assertTrue(internal == domain.InternalIri("http://project-iri")) | ||
}, | ||
test("should convert a resourceClassIri") { | ||
for { | ||
internal <- IriConverter.asInternalIri("http://0.0.0.0:3333/ontology/0001/anything/v2#Thing") | ||
} yield assertTrue(internal == InternalIri("http://www.knora.org/ontology/0001/anything#Thing")) | ||
} | ||
).provide(IriConverter.layer, StringFormatter.testLayer) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
webapi/src/main/scala/org/knora/webapi/core/InstrumentationHttpServer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
webapi/src/main/scala/org/knora/webapi/instrumentation/index/IndexApp.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
webapi/src/main/scala/org/knora/webapi/instrumentation/prometheus/PrometheusApp.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.