Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes #26 - apply PR review suggestions
  • Loading branch information
Angeluz-07 committed Mar 17, 2020
commit 6cbb933a46a2d3f1ea4c00cf9974cdb1eeded812
6 changes: 3 additions & 3 deletions time_tracker_api/activities/activities_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
title='Name',
max_length=50,
description='Canonical name of the activity',
example=faker.word(['Development', 'Training'])
example=faker.word(['Development', 'Training']),
),
'description': fields.String(
title='Description',
description='Comments about the activity',
example=faker.paragraph()
example=faker.paragraph(),
),
})

Expand All @@ -28,7 +28,7 @@
required=True,
title='Identifier',
description='The unique identifier',
example=faker.uuid4()
example=faker.random_int(1, 9999),
)
}
activity_response_fields.update(audit_fields)
Expand Down
6 changes: 3 additions & 3 deletions time_tracker_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
readOnly=True,
title='Created',
description='Date of creation',
example=faker.iso8601(end_datetime=None)
example=faker.iso8601(end_datetime=None),
),
'tenant_id': fields.String(
readOnly=True,
title='Tenant',
max_length=64,
description='The tenant this belongs to',
example=faker.uuid4()
example=faker.random_int(1, 9999),
),
'created_by': fields.String(
readOnly=True,
title='Creator',
max_length=64,
description='User that created it',
example=faker.uuid4()
example=faker.random_int(1, 9999),
),
}

Expand Down
8 changes: 4 additions & 4 deletions time_tracker_api/projects/projects_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
title='Name',
max_length=50,
description='Name of the project',
example=faker.word(['YoSpace', 'Yira'])
example=faker.word(['YoSpace', 'Yira']),
),
'description': fields.String(
title='Description',
description='Description about the project',
example=faker.paragraph()
example=faker.paragraph(),
),
'type': fields.String(
required=True,
title='Type',
max_length=30,
description='If it is `Costumer`, `Training` or other type',
example=faker.word(['Customer', 'Training'])
example=faker.word(['Customer', 'Training']),
),
})

Expand All @@ -37,7 +37,7 @@
required=True,
title='Identifier',
description='The unique identifier',
example=faker.uuid4()
example=faker.random_int(1, 9999),
)
}
project_response_fields.update(audit_fields)
Expand Down
2 changes: 1 addition & 1 deletion time_tracker_api/technologies/technologies_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
required=True,
title='Identifier',
description='The unique identifier',
example=faker.uuid4()
example=faker.random_int(1, 9999),
),
}
technology_response_fields.update(audit_fields)
Expand Down
14 changes: 7 additions & 7 deletions time_tracker_api/time_entries/time_entries_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
title='Project',
max_length=64,
description='The id of the selected project',
example=faker.uuid4()
example=faker.random_int(1, 9999),
),
'activity_id': fields.String(
required=False,
title='Activity',
max_length=64,
description='The id of the selected activity',
example=faker.uuid4()
example=faker.random_int(1, 9999),
),
'technologies': fields.String(
required=True,
Expand All @@ -32,19 +32,19 @@
'description': fields.String(
title='Comments',
description='Comments about the time entry',
example=faker.paragraph()
example=faker.paragraph(),
),
'start_date': fields.DateTime(
required=True,
title='Start date',
description='When the user started doing this activity',
example=faker.iso8601(end_datetime=None)
example=faker.iso8601(end_datetime=None),
),
'end_date': fields.DateTime(
required=True,
title='End date',
description='When the user ended doing this activity',
example=faker.iso8601(end_datetime=None)
example=faker.iso8601(end_datetime=None),
),
})

Expand All @@ -54,13 +54,13 @@
required=True,
title='Identifier',
description='The unique identifier',
example=faker.uuid4()
example=faker.random_int(1, 9999),
),
'running': fields.Boolean(
readOnly=True,
title='Is it running?',
description='Whether this time entry is currently running or not',
example=faker.boolean()
example=faker.boolean(),
),
}
time_entry_response_fields.update(audit_fields)
Expand Down