Skip to content

Commit

Permalink
rest: harmonise date time format
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Rodriguez committed Sep 3, 2018
1 parent 1f0d23a commit b3a62c0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
10 changes: 8 additions & 2 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,28 @@
"examples": {
"application/json": [
{
"created": "2018-06-13T09:47:35.66097",
"id": "256b25f4-4cfb-4684-b7a8-73872ef455a1",
"name": "mytest-1",
"status": "running",
"user": "00000000-0000-0000-0000-000000000000"
},
{
"created": "2018-06-13T09:47:35.66097",
"id": "3c9b117c-d40a-49e3-a6de-5f89fcada5a3",
"name": "mytest-2",
"status": "finished",
"user": "00000000-0000-0000-0000-000000000000"
},
{
"created": "2018-06-13T09:47:35.66097",
"id": "72e3ee4f-9cd3-4dc7-906c-24511d9f5ee3",
"name": "mytest-3",
"status": "created",
"user": "00000000-0000-0000-0000-000000000000"
},
{
"created": "2018-06-13T09:47:35.66097",
"id": "c4c0a1a6-beef-46c7-be04-bf4b3beca5a1",
"name": "mytest-4",
"status": "created",
Expand All @@ -251,6 +255,9 @@
"schema": {
"items": {
"properties": {
"created": {
"type": "string"
},
"id": {
"type": "string"
},
Expand Down Expand Up @@ -505,7 +512,7 @@
"description": "Request succeeded. Info about a workflow, including the status is returned.",
"examples": {
"application/json": {
"created": "2018-06-13 09:47:35.660977",
"created": "2018-06-13T09:47:35.66097",
"id": "256b25f4-4cfb-4684-b7a8-73872ef455a1",
"name": "mytest-1",
"status": "created",
Expand Down Expand Up @@ -720,7 +727,6 @@
"items": {
"properties": {
"last-modified": {
"format": "date-time",
"type": "string"
},
"name": {
Expand Down
15 changes: 0 additions & 15 deletions reana_server/openapi_connections/reana_workflow_controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,37 +107,29 @@
"application/json": [
{
"created": "2018-06-13T09:47:35.66097",
"finished": "2018-06-13 09:49:35.66097",
"id": "256b25f4-4cfb-4684-b7a8-73872ef455a1",
"name": "mytest-1",
"started": "2018-06-13 09:48:35.66097",
"status": "running",
"user": "00000000-0000-0000-0000-000000000000"
},
{
"created": "2018-06-13T09:47:35.66097",
"finished": "2018-06-13 09:49:35.66097",
"id": "3c9b117c-d40a-49e3-a6de-5f89fcada5a3",
"name": "mytest-2",
"started": "2018-06-13 09:48:35.66097",
"status": "finished",
"user": "00000000-0000-0000-0000-000000000000"
},
{
"created": "2018-06-13T09:47:35.66097",
"finished": "2018-06-13 09:49:35.66097",
"id": "72e3ee4f-9cd3-4dc7-906c-24511d9f5ee3",
"name": "mytest-3",
"started": "2018-06-13 09:48:35.66097",
"status": "waiting",
"user": "00000000-0000-0000-0000-000000000000"
},
{
"created": "2018-06-13T09:47:35.66097",
"finished": "No",
"id": "c4c0a1a6-beef-46c7-be04-bf4b3beca5a1",
"name": "mytest-4",
"started": "No",
"status": "waiting",
"user": "00000000-0000-0000-0000-000000000000"
}
Expand All @@ -149,18 +141,12 @@
"created": {
"type": "string"
},
"finished": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"started": {
"type": "string"
},
"status": {
"type": "string"
},
Expand Down Expand Up @@ -597,7 +583,6 @@
"items": {
"properties": {
"last-modified": {
"format": "date-time",
"type": "string"
},
"name": {
Expand Down
17 changes: 11 additions & 6 deletions reana_server/rest/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,38 @@ def get_workflows(): # noqa
type: string
user:
type: string
created:
type: string
examples:
application/json:
[
{
"id": "256b25f4-4cfb-4684-b7a8-73872ef455a1",
"name": "mytest-1",
"status": "running",
"user": "00000000-0000-0000-0000-000000000000"
"user": "00000000-0000-0000-0000-000000000000",
"created": "2018-06-13T09:47:35.66097",
},
{
"id": "3c9b117c-d40a-49e3-a6de-5f89fcada5a3",
"name": "mytest-2",
"status": "finished",
"user": "00000000-0000-0000-0000-000000000000"
"user": "00000000-0000-0000-0000-000000000000",
"created": "2018-06-13T09:47:35.66097",
},
{
"id": "72e3ee4f-9cd3-4dc7-906c-24511d9f5ee3",
"name": "mytest-3",
"status": "created",
"user": "00000000-0000-0000-0000-000000000000"
"user": "00000000-0000-0000-0000-000000000000",
"created": "2018-06-13T09:47:35.66097",
},
{
"id": "c4c0a1a6-beef-46c7-be04-bf4b3beca5a1",
"name": "mytest-4",
"status": "created",
"user": "00000000-0000-0000-0000-000000000000"
"user": "00000000-0000-0000-0000-000000000000",
"created": "2018-06-13T09:47:35.66097",
}
]
400:
Expand Down Expand Up @@ -437,7 +443,7 @@ def get_workflow_status(workflow_id_or_name): # noqa
{
"id": "256b25f4-4cfb-4684-b7a8-73872ef455a1",
"name": "mytest-1",
"created": "2018-06-13 09:47:35.660977",
"created": "2018-06-13T09:47:35.66097",
"status": "created",
"user": "00000000-0000-0000-0000-000000000000"
}
Expand Down Expand Up @@ -882,7 +888,6 @@ def get_files(workflow_id_or_name): # noqa
type: string
last-modified:
type: string
format: date-time
size:
type: integer
400:
Expand Down

0 comments on commit b3a62c0

Please sign in to comment.