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
Currently, the JSON schemas returned by the get_open_data_params_schema methods of data opener plugins (defined in xcube/core/store/accessor.py) can't specify an allowed range of dates. The returned schema can contain something like:
However, this gives no indication as to the supported range of dates. Unfortunately, JSON Schema does not allow "minimum" and "maximum" parameters to be specified for a date string (see json-schema-org/json-schema-spec#99 and json-schema-org/json-schema-spec#116 ). However, we could add an unofficial extension by adding (for example) optional min_datetime and max_datetime arguments to the JsonStringSchema constructor. The automatic JSON validation would of course not be able to deal with these, but they could be stored in fields for users of get_open_data_params_schema (e.g. UI builders).
The text was updated successfully, but these errors were encountered:
pont-us
changed the title
Extend store open params schema to include date limits
Extend store open params schema to allow date limits
Sep 15, 2020
Currently, the JSON schemas returned by the
get_open_data_params_schema
methods of data opener plugins (defined inxcube/core/store/accessor.py
) can't specify an allowed range of dates. The returned schema can contain something like:However, this gives no indication as to the supported range of dates. Unfortunately, JSON Schema does not allow "minimum" and "maximum" parameters to be specified for a date string (see json-schema-org/json-schema-spec#99 and json-schema-org/json-schema-spec#116 ). However, we could add an unofficial extension by adding (for example) optional
min_datetime
andmax_datetime
arguments to theJsonStringSchema
constructor. The automatic JSON validation would of course not be able to deal with these, but they could be stored in fields for users ofget_open_data_params_schema
(e.g. UI builders).The text was updated successfully, but these errors were encountered: