[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15629037#comment-15629037 ] ASF GitHub Bot commented on NIFI-2900: -- Github user mcgilman commented on the issue: https://github.com/apache/nifi/pull/1136 Thanks @simplesteph! This has been merged to master (without the changes to the TimeAdapter). I've created a JIRA [1] to revisit the entirety of the Rest Api with regards to the OpenApi spec when possible. [1] https://issues.apache.org/jira/browse/NIFI-2978 > 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 > Fix For: 1.1.0 > > > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15629001#comment-15629001 ] ASF subversion and git services commented on NIFI-2900: --- Commit 56da2b51e16d92df07e25277d01c85ad622015a9 in nifi's branch refs/heads/master from [~stephane.maa...@gmail.com] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=56da2b5 ] [NIFI-2900] transformed all datetime fields to string as they don't comply with ISO norms. This closes #1136. > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15629003#comment-15629003 ] ASF GitHub Bot commented on NIFI-2900: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/1136 > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15628629#comment-15628629 ] ASF GitHub Bot commented on NIFI-2900: -- Github user simplesteph commented on the issue: https://github.com/apache/nifi/pull/1136 hi @mcgilman , pain commit but it should be good. the resulting `swagger.json` doesn't have any datetime, which makes the api compliant in that regard. Not sure when 2.0 is planned, and not sure how you track todos against it, but converting these fields back to compliant datetime is a must for the next version of the api > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15619313#comment-15619313 ] ASF GitHub Bot commented on NIFI-2900: -- Github user simplesteph commented on the issue: https://github.com/apache/nifi/pull/1136 Sorry I haven't had the time to work on it just yet... Agree with all the above > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15615339#comment-15615339 ] ASF GitHub Bot commented on NIFI-2900: -- Github user mcgilman commented on the issue: https://github.com/apache/nifi/pull/1136 @mike42 - Thanks for checking out Apache NiFi and looking to make improvements here. We just released version 1.0.0 so we don't have another major release scheduled in the immediate future. We could certainly look to update the endpoints to return these new values in addition to the existing ones (which could then be marked as deprecated). Or we could investigate a means for versioning the API so that existing clients wouldn't break and new clients could utilize the new endpoints. Though it may make sense to do this work when we add i18n support throughout the application which will likely require either a major NiFi version change or supporting multiple versions of the REST API concurrently. Regardless what additional work we identify here, I believe the work that was discussed with @simplesteph needs to happen as the documentation is currently misreporting the actual data type of these fields. > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15613633#comment-15613633 ] ASF GitHub Bot commented on NIFI-2900: -- Github user mike42 commented on the issue: https://github.com/apache/nifi/pull/1136 @mcgilman- I would also like to see the REST API change in the next major release. Date localisation should be moved to the front-end, as only the browser knows the user's locale and timezone. Noting your comments above, would you be open to reviewing a pull request which corrects the API to use ISO timestamps, and also introduces `moment.js` in the front end to display localised timestamps? > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15585397#comment-15585397 ] ASF GitHub Bot commented on NIFI-2900: -- Github user mcgilman commented on the issue: https://github.com/apache/nifi/pull/1136 Hey sorry, I was traveling yesterday. I don't see your most recent changes. Can you double check that you've pushed them? > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15580694#comment-15580694 ] ASF GitHub Bot commented on NIFI-2900: -- Github user simplesteph commented on the issue: https://github.com/apache/nifi/pull/1136 I think then we need to add `dataType = "string"` in the annotation to every field `DateTime` that uses any `TimeAdapter` or `DateTimeAdapter`. Hopefully this way the format won't be shown as "date-time". Somehow my maven is acting up and I can't test it... Let me know your thoughts > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15577879#comment-15577879 ] Stephane Maarek commented on NIFI-2900: --- Agreed! Makes sense. Maybe keep this API change in mind for a 2.0 release. I'll look into specifying string instead of date time for swagger in this PR this weekend hopefully On Sat., 15 Oct. 2016, 10:00 pm ASF GitHub Bot (JIRA),> 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15577869#comment-15577869 ] ASF GitHub Bot commented on NIFI-2900: -- Github user mcgilman commented on the issue: https://github.com/apache/nifi/pull/1136 NiFi follows the semantic versioning guidelines. What your suggesting is changing the meaning of those fields. They are strings that are meant to be human-readable (one with the time and the other with the date and time). If we change them, we could be affecting any existing clients of that API that expect them to be human-readable strings. The clients I'm referring is anyone consuming this API in an existing version of NiFi. As you mentioned, in our case we would need to update the UI (which is a client of this API) to reformat it as necessary. This is not something we would expect others to do in a minor/incremental version change or without somehow versioning the API. As I mentioned earlier, I believe that any field using a JAXB adapter is currently being interpreted incorrectly by Swagger. While it would be nice if Swagger could correctly determine the actual data type (a string in this case and not a date-time) it appears they at least provide a mechanism for setting it explicitly. We should be taking advantage of that. > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15577263#comment-15577263 ] ASF GitHub Bot commented on NIFI-2900: -- Github user simplesteph commented on the issue: https://github.com/apache/nifi/pull/1136 That could be a solution, but I believe it's a more complicated one than just keeping the date-time annotation and make the API compliant with the OpenAPI specs. If you create a "Time" class then it could work. I looked and it seems that yes, Swagger doesn't take JAXB adapters into account. I'm still wondering if it wouldn't be simpler and better to just keep it as date-time and update the UI to re-format it if need be. Which clients would be broken by this change? > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15574469#comment-15574469 ] ASF GitHub Bot commented on NIFI-2900: -- GitHub user simplesteph opened a pull request: https://github.com/apache/nifi/pull/1136 [NIFI-2900] fixes timestamps to be ISO 8601 compliant, as it should b… …e because of OpenAPI specs You can merge this pull request into a Git repository by running: $ git pull https://github.com/simplesteph/nifi NIFI-2900 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/1136.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1136 commit 9d0f9a9625cbd4cd9b42e9695b8929087a81 Author: simplestephDate: 2016-10-14T06:57:41Z [NIFI-2900] fixes timestamps to be ISO 8601 compliant, as it should be because of OpenAPI specs > 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) optionalThe 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)
[jira] [Commented] (NIFI-2900) DateTime API Endpoints don't respect RFC 3339
[ https://issues.apache.org/jira/browse/NIFI-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15574199#comment-15574199 ] Stephane Maarek commented on NIFI-2900: --- I'll try to submit a PR for this. I think only the TimeAdapter.java file needs to be changed. > 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) optionalThe 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)