clarify validation for non-concept property values
properties can be either vocabulary-backend concept
s, or free-form value
s. for the latter, the property type defines a type
, which can be string|date|int|float|url
. however, according to both the openapi docs, and the actual values returned from the api, all values are cast to strings, and no serverside validation seems to happen for these values.
for example, the year
property type is an int
: curl http://localhost:8080/api/property-types/year
returns:
{"code":"year","label":"Year","type":"int","ord":23,"allowedVocabularies":[]}
however, submitting an entity with a non-integer year
property is totally possible.
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ..." -d '{"label":"Label","description":"","properties":[{"type": {"code": "year"},"value":"one two"}]}' http://localhost:8080/api/datasets | jq
similarly, for e.g. media
properties, which should be url
s, but accept any value.
Edited by Stefan Probst