Skip to content

Commit

Permalink
chore: Update dsp-api to v30.12.0 (#634)
Browse files Browse the repository at this point in the history
* update api and fix datestamps

* fix order
  • Loading branch information
mpro7 authored Apr 19, 2024
1 parent 1cac7ea commit 37ebba6
Show file tree
Hide file tree
Showing 141 changed files with 407 additions and 151 deletions.
2 changes: 1 addition & 1 deletion src/api/admin/groups/groups-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("GroupsEndpoint", () => {
(response: ApiResponseData<GroupsResponse>) => {

expect(response.body.groups.length).toEqual(2);
expect(response.body.groups[0].id).toEqual("http://rdfh.ch/groups/0001/thing-searcher");
expect(response.body.groups[0].id).toEqual("http://rdfh.ch/groups/00FF/images-reviewer");

done();
});
Expand Down
2 changes: 1 addition & 1 deletion src/api/admin/projects/projects-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("ProjectsEndpoint", () => {
(response: ApiResponseData<ProjectsResponse>) => {

expect(response.body.projects.length).toEqual(6);
expect(response.body.projects[0].id).toEqual("http://rdfh.ch/projects/yTerZGyxjZVqFMNNKXCDPF");
expect(response.body.projects[0].id).toEqual("http://rdfh.ch/projects/0803");

done();
});
Expand Down
4 changes: 2 additions & 2 deletions src/api/v2/ontology/ontologies-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ describe("OntologiesEndpoint", () => {
deleteCardinalitiesFromClassRequest.id = "http://0.0.0.0:3333/ontology/0001/freetest/v2";

// update this timestamp after every release of dsp-api
deleteCardinalitiesFromClassRequest.lastModificationDate = "2024-04-05T05:48:43.136018292Z";
deleteCardinalitiesFromClassRequest.lastModificationDate = "2024-04-19T09:02:34.427565872Z";

const cardinalityToRemove = new UpdateResourceClassCardinality();

Expand Down Expand Up @@ -1167,7 +1167,7 @@ describe("OntologiesEndpoint", () => {
deleteCardinalitiesFromClassRequest.id = "http://0.0.0.0:3333/ontology/0001/freetest/v2";

// update this timestamp after every release of dsp-api
deleteCardinalitiesFromClassRequest.lastModificationDate = "2024-04-05T05:48:43.136018292Z";
deleteCardinalitiesFromClassRequest.lastModificationDate = "2024-04-19T09:02:34.427565872Z";

const cardinalityToRemove = new UpdateResourceClassCardinality();

Expand Down
8 changes: 4 additions & 4 deletions src/api/v2/resource/resources-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ describe("ResourcesEndpoint", () => {
expect(res.hasPermissions).toEqual("CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:ProjectMember");

// update this timestamp after every release of dsp-api
expect(res.lastModificationDate).toEqual("2024-04-06T05:45:38.275882745Z");
expect(res.lastModificationDate).toEqual("2024-04-20T09:00:04.451529931Z");
done();
}
);
Expand Down Expand Up @@ -550,7 +550,7 @@ describe("ResourcesEndpoint", () => {
updateResourceMetadata.lastModificationDate = "2021-09-30T16:41:46.980756Z";

// update this timestamp after every release of dsp-api
updateResourceMetadata.newModificationDate = "2024-04-06T05:45:38.811036647Z";
updateResourceMetadata.newModificationDate = "2024-04-20T09:00:04.958638463Z";

knoraApiConnection.v2.res.updateResourceMetadata(updateResourceMetadata).subscribe(
(res: UpdateResourceMetadataResponse) => {
Expand All @@ -560,7 +560,7 @@ describe("ResourcesEndpoint", () => {
expect(res.hasPermissions).toEqual("CR knora-admin:ProjectMember|V knora-admin:ProjectMember");

// update this timestamp after every release of dsp-api
expect(res.lastModificationDate).toEqual("2024-04-06T05:45:38.811036647Z");
expect(res.lastModificationDate).toEqual("2024-04-20T09:00:04.958638463Z");
done();
}
);
Expand All @@ -578,7 +578,7 @@ describe("ResourcesEndpoint", () => {
expectedPayload["http://api.knora.org/ontology/knora-api/v2#lastModificationDate"]["@value"] = "2021-09-30T16:41:46.980756Z";

// update this timestamp after every release of dsp-api
expectedPayload["http://api.knora.org/ontology/knora-api/v2#newModificationDate"]["@value"] = "2024-04-06T05:45:38.811036647Z";
expectedPayload["http://api.knora.org/ontology/knora-api/v2#newModificationDate"]["@value"] = "2024-04-20T09:00:04.958638463Z";

expect(request.data()).toEqual(expectedPayload);

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"group":{"descriptions":[{"value":"UpdatedGroupDescription","language":"en"}],"id":"http://rdfh.ch/groups/00FF/YqZVeRFtSPOS72JbWtSMqQ","name":"UpdatedGroupName","project":{"description":[{"value":"A demo project of a collection of images","language":"en"}],"id":"http://rdfh.ch/projects/00FF","keywords":["collection","images"],"logo":null,"longname":"Image Collection Demo","ontologies":["http://0.0.0.0:3333/ontology/00FF/images/v2"],"selfjoin":false,"shortcode":"00FF","shortname":"images","status":true},"selfjoin":false,"status":true}}
{"group":{"descriptions":[{"value":"UpdatedGroupDescription","language":"en"}],"id":"http://rdfh.ch/groups/00FF/9lU8pN1nRDqxAQsSL8khvQ","name":"UpdatedGroupName","project":{"description":[{"value":"A demo project of a collection of images","language":"en"}],"id":"http://rdfh.ch/projects/00FF","keywords":["collection","images"],"logo":null,"longname":"Image Collection Demo","ontologies":["http://0.0.0.0:3333/ontology/00FF/images/v2"],"selfjoin":false,"shortcode":"00FF","shortname":"images","status":true},"selfjoin":false,"status":true}}
2 changes: 1 addition & 1 deletion test/data/api/admin/groups/create-group-response.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"group":{"descriptions":[{"value":"NewGroupDescription","language":"en"}],"id":"http://rdfh.ch/groups/00FF/YqZVeRFtSPOS72JbWtSMqQ","name":"NewGroup","project":{"description":[{"value":"A demo project of a collection of images","language":"en"}],"id":"http://rdfh.ch/projects/00FF","keywords":["collection","images"],"logo":null,"longname":"Image Collection Demo","ontologies":["http://0.0.0.0:3333/ontology/00FF/images/v2"],"selfjoin":false,"shortcode":"00FF","shortname":"images","status":true},"selfjoin":false,"status":true}}
{"group":{"descriptions":[{"value":"NewGroupDescription","language":"en"}],"id":"http://rdfh.ch/groups/00FF/9lU8pN1nRDqxAQsSL8khvQ","name":"NewGroup","project":{"description":[{"value":"A demo project of a collection of images","language":"en"}],"id":"http://rdfh.ch/projects/00FF","keywords":["collection","images"],"logo":null,"longname":"Image Collection Demo","ontologies":["http://0.0.0.0:3333/ontology/00FF/images/v2"],"selfjoin":false,"shortcode":"00FF","shortname":"images","status":true},"selfjoin":false,"status":true}}
2 changes: 1 addition & 1 deletion test/data/api/admin/groups/delete-group-response.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"group":{"descriptions":[{"value":"UpdatedGroupDescription","language":"en"}],"id":"http://rdfh.ch/groups/00FF/YqZVeRFtSPOS72JbWtSMqQ","name":"UpdatedGroupName","project":{"description":[{"value":"A demo project of a collection of images","language":"en"}],"id":"http://rdfh.ch/projects/00FF","keywords":["collection","images"],"logo":null,"longname":"Image Collection Demo","ontologies":["http://0.0.0.0:3333/ontology/00FF/images/v2"],"selfjoin":false,"shortcode":"00FF","shortname":"images","status":true},"selfjoin":false,"status":false}}
{"group":{"descriptions":[{"value":"UpdatedGroupDescription","language":"en"}],"id":"http://rdfh.ch/groups/00FF/9lU8pN1nRDqxAQsSL8khvQ","name":"UpdatedGroupName","project":{"description":[{"value":"A demo project of a collection of images","language":"en"}],"id":"http://rdfh.ch/projects/00FF","keywords":["collection","images"],"logo":null,"longname":"Image Collection Demo","ontologies":["http://0.0.0.0:3333/ontology/00FF/images/v2"],"selfjoin":false,"shortcode":"00FF","shortname":"images","status":true},"selfjoin":false,"status":false}}
Loading

0 comments on commit 37ebba6

Please sign in to comment.