You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type explains that the value can only be "text/csv", which means validation will fail if it is anything else. This is the behavior we want for the CSVStrategy.
The second "text/csv" is the default value that will be set for mediaType should it not be explicitly given.
One could argue that mediaType must ALWAYS be explicitly provided, and hence the default value can be changed to an ellipsis (...) to signify this? I don't mind that change at all. This will reflect what is originally intended for the ResourceConfig as well, but can only be realized through a custom validator due to it only being valid if different pairs of fields are given at the same time (mediaType + downloadUrl OR accessUrl + accessService).
The whole discussion here between @daniel-sintef and myself is a nice one, also to give a bit more context.
Essentially, the ResourceConfig fields mediaType, downloadUrl, accessUrl, and accessService are not explicitly set to be "required" fields in the ResourceConfig data model (instead a validator is used to make them "required").
For strategy-specific config classes, i.e., sub-classes of ResourceConfig, it might be nice to have these fields be explicitly "required", since it can be no other way for that particular strategy.
The text was updated successfully, but these errors were encountered:
Originally posted by @CasperWA in #330 (comment)
The whole discussion here between @daniel-sintef and myself is a nice one, also to give a bit more context.
Essentially, the
ResourceConfig
fieldsmediaType
,downloadUrl
,accessUrl
, andaccessService
are not explicitly set to be "required" fields in theResourceConfig
data model (instead a validator is used to make them "required").For strategy-specific config classes, i.e., sub-classes of
ResourceConfig
, it might be nice to have these fields be explicitly "required", since it can be no other way for that particular strategy.The text was updated successfully, but these errors were encountered: