-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data attribute filter accepts date-time #473
Comments
JSON doesn't have a native datetime format so this will be quite complicated, we would recommend to store the date separately if it is necessary to filter on it |
@alextreme what do you mean there is no native date time format? If you mean that dates are serialised either as numeric timestamps or string values (RFC 3339 / ISO 8601) then yes. However, JSON Schema very much allows to enforce those standards upon a property using the "format" attribute. Unfortunately, the validator used in objects-api/objecttypes-api does not adhere to the standards and simply ignores the format field. I discussed this several months ago with @joeribekker but haven't heard back about this. @flinden68 is this what you meant? |
@sdegroot yes, because we pass on the date also a date format as string, should be that hard also accept a date-time formatted string |
@sdegroot https://json-schema.org/understanding-json-schema/reference/string#format
|
Ah, so it is optional. I would highly suggest enabling this as it will increase data quality -a lot- :) |
@alextreme I agree with @sdegroot. It would help a lot for connecting applications as they would get errors while unmarshalling the json objects. |
@JanBrek please indeed create a Taiga issue with the details of the object and json schema involved, combined with the API request which failed. I'll then pick this up with Team Bron to triage further |
@JanBrek @alextreme an example could be /api/v2/objects?page=1&pageSize=10&type=https://example.com/api/v1/objecttypes/78731088-430f-49fd-9a4c-80ddd42ded28&data_attrs=identificatie__type__exact__bsn,identificatie__value__exact__999990755,publicatiedatum__lte__2025-01-10T12:00:00.000 Nice to would be where the Zone is included /api/v2/objects?page=1&pageSize=10&type=https://example.com/api/v1/objecttypes/78731088-430f-49fd-9a4c-80ddd42ded28&data_attrs=identificatie__type__exact__bsn,identificatie__value__exact__999990755,publicatiedatum__lte__2025-01-10T12:00:00.000Z |
Discussed with Team Bron and Dimpact
Estimated at a week of development time, for @PeterVanBragt to approve |
For now no budget for this feature at GDH (also no internal sponsor). |
Thema / Theme
Objecten API
Omschrijving / Description
Momenteel kunnen we voor bijvoorbeeld LTE alleen maar een date of numeric waarde gebruiken.
Maar in ons object hebben we te maken met date-time en dan faalt het LTE filter als je de huidige datum gebruikt om alle objecten op wilt halen voor vandaag en ouder.
Toegevoegde waarde / Added value
Hierdoor kan je beter filteren op basis van een date-time
Aanvullende opmerkingen / Additional context
No response
The text was updated successfully, but these errors were encountered: