Giter Club home page Giter Club logo

set-api's Introduction

set-api

The repository for the Europeana User Sets API

License

Licensed under the EUPL V.1.2

For full details, see LICENSE.md.

set-api's People

Contributors

gsergiu avatar ikattey avatar luthien-in-edhil avatar nshweta90 avatar p-ehlert avatar rwd avatar srdjanstevanetic avatar srishtisingh-eu avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

set-api's Issues

Support new visibility field

We need to cover different levels of visibility. The following states have been considered:

  1. private: only visible to the owner
  2. public: visible to the owner and anyone else that the owner shared with (also editors)
  3. published: visible to all users on Collections (can only be set by an editor)

User Sets: Implement update

Implement update method for an existing Set (finding it by identifier) using template JSON content, optionally made out of title, type and description for such Set.

Add type for favorites

Add the property to be used to differentiate user sets that are favorites from other kinds of user sets
Only 1 set per user should have the type=”BookmarkFolder”. We must cover this with a restriction.
Also support in search.

Make delete permanent

The delete should become permanent and deprecated functionality is no longer in place

CORS headers

Set explicitly the allow-credentials option in configurations,

Delete an existing Set

Check user credentials, if invalid respond with HTTP 401 or if unauthorized respond with HTTP 403;
Check timestamp if provided within the “If-Match” HTTP header, if false respond with HTTP 412;
Retrieve a Set based on its identifier;
If the Set doesn’t exist, respond with HTTP 404;
If the Set is disabled and the user is not an admin, respond with HTTP 410;
If the user is an Administrator then permanently remove item (and all items that are members of the Set), otherwise flag it as disabled;
Respond with HTTP 204

Admins are not being recognized

The admin should be allowed to perform any operation, that an user can. The isOwnerOrAdmin has to be enabled for all update (PUT) and delete methods.

Implement filter fields parameter

The search entity must implement support for custom selection of fields to be included in the response.
fl parameter must include the coma separated list of fields to be included in the response. When fl parameter is used, only these fields must be returned in list of items.

Support dereferencing items

The new profile will be named "itemDescriptions" and correspond to the Prefer header: “oa:preferContainedDescription”.

Validate isDefinedBy URL

The URL should use the production Search API. We could also make a GET upon creation to see if the request returns a 200 (meaning is valid).

Create project modules

For the MVP the following modules are needed
set-definitions
set-common
set-mongo
set-web

Use KeyCloak tokens for authorization

Following the release of KeyCloak, update the Sets API to accept tokens issued by KeyCloak and use the information in the JWT token to validate authorization.

User Sets: order of fields

Implement field ordering for better readability of the data. The fields should follow a specific order.

The order of the fields must be the following (not all fields are applicable for all methods):

context
id
type
title
description
(other metadata fields...)
creator (not implemented for now)
created
modified
items
first
last
total

Delete item from user set

Delete an item from a set using following parameters:

"IDENTIFIER": the local identifier for the Set.
"DATASET_ID": identifier of the dataset, typically a number.
"LOCAL_ID": local identifier within the provider.
“wskey” and “userToken” (HTTP Parameters).

Make inventory of test use cases that are missing

  1. Migrating tests to use the spring boot for integration testing, following the conventions from:

Template project for API:

https://github.com/europeana/api-template/tree/master/src/test/java/eu/europeana/api/myapi/web - Connect to preview

Example from Thumbnail testing:

https://github.com/europeana/thumbnail-api/blob/master/src/test/java/eu/europeana/thumbnail/web/ThumbnailControllerTest.java

For this purpose, given the issues in eclipse with test dependencies, we have to create a new project “set-integration-testing” and write the first test for creating a new user set.

  1. Update the list of test classes, by creating one tab for each controller. The Test method must take in account also the 3 types of the Sets: BookmarkFolder, close sets, open sets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.