FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
50 stars 42 forks source link

Allow for more than one item in the "information" array of a registration #369

Open kzangeli opened 4 years ago

kzangeli commented 4 years ago

Earlier we decided to allow for only one item in the "information" array of a context source registration. That decision was made because we had the impression we wouldn't be able to allow more than one item in the array without breaking the APIv1 database model. Later studies have shown that it is possible to allow for more than one information item without breaking the database model.

So, this issue is about modifying the three existing services for creation, retrieval and query of registrations.

This issue should be fixed before PATCH /csourceRegistrations/{regId} is implemented.

kzangeli commented 4 years ago

After looking inside the source code, the following struct was found:

struct DataProvided
{
  std::vector<EntID>        entities;
  std::vector<std::string>  attributes;

#ifdef ORIONLD
  std::vector<std::string>  propertyV;
  std::vector<std::string>  relationshipV;
#endif

  std::string               toJson();
};

I.e., the database model allows for more than one item inside the information array of NGSI-LD Registration, but the APIv2 implementation cannot be used (mongoBackend). So, this issue just got much bigger! The three already implemented requests must be reimplemented "the new way", i.e. without mongoBackend for this to work.

So, I'm postponing this and implementation of PATCH Registration will be implemented before this issue is tackled.