|
14 | 14 |
|
15 | 15 | # TimeEntry Model |
16 | 16 | time_entry_input = ns.model('TimeEntryInput', { |
17 | | - 'project_id': fields.Integer( |
| 17 | + 'project_id': fields.String( |
18 | 18 | required=True, |
19 | 19 | title='Project', |
20 | 20 | description='The id of the selected project', |
21 | | - example=faker.random_int(1, 9999), |
| 21 | + example=faker.uuid4(), |
22 | 22 | ), |
23 | | - 'activity_id': fields.Integer( |
| 23 | + 'activity_id': fields.String( |
| 24 | + required=True, |
24 | 25 | title='Activity', |
25 | 26 | description='The id of the selected activity', |
26 | | - example=faker.random_int(1, 9999), |
27 | | - ), |
28 | | - 'technologies': fields.List( |
29 | | - fields.String( |
30 | | - required=True, |
31 | | - title='Technologies', |
32 | | - description='Technology names used in this time-entry', |
33 | | - ), |
34 | | - example=faker.words( |
35 | | - 3, |
36 | | - ['java', 'elixir', 'python', 'docker'], |
37 | | - unique=True |
38 | | - ) |
| 27 | + example=faker.uuid4(), |
39 | 28 | ), |
40 | 29 | 'description': fields.String( |
41 | 30 | title='Comments', |
|
54 | 43 | description='When the user ended doing this activity', |
55 | 44 | example=faker.iso8601(end_datetime=None), |
56 | 45 | ), |
| 46 | + 'uri': fields.String( |
| 47 | + title='Uniform Resource identifier', |
| 48 | + description='Either identifier or locator', |
| 49 | + example=faker.words( |
| 50 | + 1, |
| 51 | + ['http://example.com/mypage.html', '/some/page.html'] |
| 52 | + ), |
| 53 | + ), |
| 54 | + 'owner_id': fields.String( |
| 55 | + required=True, |
| 56 | + title='Owner of time entry', |
| 57 | + description='User who owns the time entry', |
| 58 | + example=faker.uuid4(), |
| 59 | + ), |
| 60 | + 'tenant_id': fields.String( |
| 61 | + required=True, |
| 62 | + title='Identifier of Tenant', |
| 63 | + description='Tenant this project belongs to', |
| 64 | + example=faker.uuid4(), |
| 65 | + ), |
57 | 66 | }) |
58 | 67 |
|
59 | 68 | time_entry_response_fields = { |
60 | 69 | 'id': fields.String( |
61 | 70 | readOnly=True, |
62 | 71 | title='Identifier', |
63 | 72 | description='The unique identifier', |
64 | | - example=faker.random_int(1, 9999), |
| 73 | + example=faker.uuid4(), |
65 | 74 | ), |
66 | 75 | 'running': fields.Boolean( |
67 | 76 | readOnly=True, |
|
0 commit comments