[
https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15575248#comment-15575248
]
ASF GitHub Bot commented on NIFI-2900:
--------------------------------------
Github user mcgilman commented on the issue:
https://github.com/apache/nifi/pull/1136
Hey @simplesteph, thanks for the PR!
I'm not sure we can merge this in as is. I'm afraid that changing the
format of the of pre-existing values (like all time values in this case) could
break existing clients.
We do have two separate adapters for `java.util.Date`'s. The purpose of
these adapters is to create human readable values for either a timestamp or for
a date-time. The timestamps are typically used to show when something was
latest refreshed. Due to the frequency, rendering the date in these scenarios
is not necessary. The date-time adapter will additionally include the date and
is typically used for items like events.
Admittedly, I'm not super familiar with the OpenAPI spec. Rather than
changing these values, would it help if we updated the documentation to better
set the expectation of what's being returned?
> 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
>
> Hi,
> 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
> Edit:
> 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
> (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types).
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)