Projet

Général

Profil

0001-cmis-include-descriptions-in-file-upload-schema-5466.patch

Valentin Deniaud, 08 juillet 2021 12:28

Télécharger (2,41 ko)

Voir les différences:

Subject: [PATCH] cmis: include descriptions in file upload schema (#54661)

 passerelle/apps/cmis/models.py | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)
passerelle/apps/cmis/models.py
45 45

  
46 46
UPLOAD_SCHEMA = {
47 47
    'type': 'object',
48
    'title': _('CMIS file upload'),
48 49
    'properties': {
49 50
        'file': {
51
            'title': _('File object'),
50 52
            'type': 'object',
51 53
            'properties': {
52 54
                'filename': {
53 55
                    'type': 'string',
56
                    'description': _('Filename (numbers, letters and special caracters "%s" are allowed)')
57
                    % SPECIAL_CHARS,
54 58
                    'pattern': FILE_NAME_PATTERN,
55 59
                },
56
                'content': {'type': 'string'},
57
                'content_type': {'type': 'string'},
60
                'content': {
61
                    'type': 'string',
62
                    'description': _('Content'),
63
                },
64
                'content_type': {
65
                    'type': 'string',
66
                    'description': _('Content type'),
67
                },
58 68
            },
59 69
            'required': ['content'],
60 70
        },
61 71
        'filename': {
62 72
            'type': 'string',
73
            'description': _('Filename (takes precendence over filename in "file" object)'),
63 74
            'pattern': FILE_NAME_PATTERN,
64 75
        },
65 76
        'path': {
66 77
            'type': 'string',
78
            'description': _('File path (with leading but not trailing slash)'),
67 79
            'pattern': FILE_PATH_PATTERN,
68 80
        },
69
        'object_type': {'type': 'string'},
70
        'properties': {'type': 'object', 'additionalProperties': {'type': 'string'}},
81
        'object_type': {
82
            'type': 'string',
83
            'description': _('CMIS object type'),
84
        },
85
        'properties': {
86
            'type': 'object',
87
            'title': _('CMIS properties'),
88
            'additionalProperties': {'type': 'string'},
89
        },
71 90
    },
72 91
    'required': ['file', 'path'],
73 92
    'unflatten': True,
74
-