|
12 | 12 | # ProjectType Model |
13 | 13 | project_type_input = ns.model('ProjectTypeInput', { |
14 | 14 | 'name': fields.String( |
15 | | - required=True, |
16 | 15 | title='Name', |
| 16 | + required=True, |
17 | 17 | max_length=50, |
18 | 18 | description='Name of the project type', |
19 | 19 | example=faker.random_element(["Customer","Training","Internal"]), |
20 | 20 | ), |
21 | 21 | 'description': fields.String( |
22 | 22 | title='Description', |
| 23 | + required=False, |
23 | 24 | max_length=250, |
24 | | - description='Description about the project type', |
| 25 | + description='Comments about the project type', |
25 | 26 | example=faker.paragraph(), |
26 | 27 | ), |
27 | 28 | 'customer_id': fields.String( |
28 | 29 | title='Identifier of the Customer', |
29 | | - description='Customer this project type belongs to', |
| 30 | + required=False, |
| 31 | + description='Customer this project type belongs to. ' |
| 32 | + 'If not specified, it will be considered an internal project of the tenant.', |
30 | 33 | example=faker.uuid4(), |
31 | 34 | ), |
32 | 35 | 'parent_id': fields.String( |
33 | | - title='Identifier of Parent of the project type', |
34 | | - description='Defines a self reference of the model ProjectType', |
| 36 | + title='Identifier of the parent project type', |
| 37 | + required=False, |
| 38 | + description='This parent node allows to created a tree-like structure for project types', |
35 | 39 | example=faker.uuid4(), |
36 | 40 | ), |
37 | 41 | }) |
38 | 42 |
|
39 | | -project_type_response_fields = { |
40 | | - 'id': fields.String( |
41 | | - readOnly=True, |
42 | | - required=True, |
43 | | - title='Identifier', |
44 | | - description='The unique identifier', |
45 | | - example=faker.uuid4(), |
46 | | - ), |
47 | | - 'tenant_id': fields.String( |
48 | | - required=True, |
49 | | - title='Identifier of Tenant', |
50 | | - description='Tenant this project type belongs to', |
51 | | - example=faker.uuid4(), |
52 | | - ), |
53 | | -} |
| 43 | +project_type_response_fields = {} |
54 | 44 | project_type_response_fields.update(common_fields) |
55 | 45 |
|
56 | 46 | project_type = ns.inherit( |
|
0 commit comments