ASF GitHub Bot commented on NIFI-2900:
Github user simplesteph commented on the issue:
I understand the concern. The tests were passing on my end, but maybe
something has been broken.
Let me explain the rationale:
1) Your API should comply with the OpenAPI specs as you're using swagger
and date-time (see
datetime looks like this:
1985-04-12T23:20:50.52Z or 1996-12-19T16:39:57-08:00. Knowing this,
two solutions: either you rename your variable to "string" (and then the
expectations are set), or if you keep date-time, you need to merge my changes.
2) Regarding the UI: in my PR, I chosen to have timestamps with zones,
meaning the timestamp will be adapted from where the NiFi instance is running
(so not UTC). That's a good first step. The second step is to have the UI
website format the date it's receiving from the now-valid REST API, and that's
probably something we may want to add in this PR, or in a separate one. FYI- I
have tested the UI and things aren't broken as far as I can see
3) For breaking the existing clients: which clients are you talking about?
Looking forward to reading from you
> DateTime API Endpoints don't respect RFC 3339
> Key: NIFI-2900
> URL: https://issues.apache.org/jira/browse/NIFI-2900
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.0.0
> Reporter: Stephane Maarek
> the endpoint /flow/process-group/id is supposed to return lastRefreshed as
> part of ProcessGroupFlowDTO as a DateTime, as indicated here:
> lastRefreshed string (date-time) optional The time the flow for
> the process group was last refreshed.
> as it currently stands, what I am getting doesn't look like a timestamp:
> "lastRefreshed":"14:02:46 AEDT"
> I'm not sure how much of the overall API is affected
> Actually, it seems every date a "date-time" is created we expect the format
> "HH:mm:ss z".
> As per the OpenAPI specs, if a field is annotated "date-time", it should
> respect the RFC 3339 convention
This message was sent by Atlassian JIRA