gbv / jskos-server

Web service to access JSKOS data
https://coli-conc.gbv.de/api/
MIT License
6 stars 4 forks source link

Add option to enable open world assumption in response data #158

Closed nichtich closed 2 years ago

nichtich commented 2 years ago

By default jskos-server uses closed world assumption, e.g. when a concept scheme has no concepts in the server instance, than its field concepts is returned with value [] indicating that no concept exist at all. The jskos-server instance of BARTOC should better be run under open world assumption.

Add a configuration option closedWorldAssumption with default true. If set to false, the method cleanJSON should remove all fields with empty array or empty object values. In example 12 of the JSKOS spec this would remove altLabel and notation.

stefandesu commented 2 years ago

Sounds good. In short: All empty array and object values on the top level of any kind of entity will be removed before sending the data, if closedWorldAssumption is set to false, right? I was wondering if this could have any negative consequences, but as far as I can tell, there isn't any.

stefandesu commented 2 years ago

To-Dos: