datagov-cz / sgov

SGoV server and tooling
MIT License
2 stars 1 forks source link

Provide API to handle situation when creating a vocabulary with IRI that already exists #131

Open blcham opened 2 years ago

blcham commented 2 years ago

Relates to https://github.com/opendata-mvcr/sgov-assembly-line/issues/36 and https://github.com/opendata-mvcr/mission-control/pull/226.

We need to handle situations when the user wants to create a vocabulary with IRI that already exists. We need to consider case when the existing vocabulary :

Possible solution:

  1. does not allow it if it is loaded or published
  2. only when it is not published, provide the possibility to warn the user
    • this could be done by providing API to return all loaded vocabularies or to test for one vocabulary if it is loaded

I suggest going with option 1. But even for case 1, it makes sense to create an API that checks if vocabulary exists, so possible UI could show a warning upfront.

MichalMed commented 2 years ago

Implement solution 2

MichalMed commented 2 years ago

Temporary solution: deny creation on same IRI in SSP, otherwise, create.