|
@@ -358,7 +358,7 @@ class ContentDigestSchema(marshmallow.Schema):
|
358
|
358
|
)
|
359
|
359
|
label = marshmallow.fields.Str(example='Intervention Report 12')
|
360
|
360
|
content_type = marshmallow.fields.Str(
|
361
|
|
- example='htmlpage',
|
|
361
|
+ example='html-content',
|
362
|
362
|
validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
|
363
|
363
|
)
|
364
|
364
|
sub_content_types = marshmallow.fields.List(
|
|
@@ -403,10 +403,18 @@ class ContentSchema(ContentDigestSchema):
|
403
|
403
|
|
404
|
404
|
|
405
|
405
|
class ThreadContentSchema(ContentSchema):
|
|
406
|
+ content_type = marshmallow.fields.Str(
|
|
407
|
+ example='thread',
|
|
408
|
+ validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
|
|
409
|
+ )
|
406
|
410
|
raw_content = marshmallow.fields.String('Description of Thread')
|
407
|
411
|
|
408
|
412
|
|
409
|
413
|
class HtmlDocumentContentSchema(ContentSchema):
|
|
414
|
+ content_type = marshmallow.fields.Str(
|
|
415
|
+ example='html-content',
|
|
416
|
+ validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
|
|
417
|
+ )
|
410
|
418
|
raw_content = marshmallow.fields.String('<p>Html page Content !</p>')
|
411
|
419
|
|
412
|
420
|
#####
|
|
@@ -425,10 +433,18 @@ class RevisionSchema(ContentDigestSchema):
|
425
|
433
|
|
426
|
434
|
|
427
|
435
|
class ThreadRevisionSchema(RevisionSchema):
|
|
436
|
+ content_type = marshmallow.fields.Str(
|
|
437
|
+ example='thread',
|
|
438
|
+ validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
|
|
439
|
+ )
|
428
|
440
|
raw_content = marshmallow.fields.String('Description of Thread')
|
429
|
441
|
|
430
|
442
|
|
431
|
443
|
class HtmlDocumentRevisionSchema(RevisionSchema):
|
|
444
|
+ content_type = marshmallow.fields.Str(
|
|
445
|
+ example='html-content',
|
|
446
|
+ validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
|
|
447
|
+ )
|
432
|
448
|
raw_content = marshmallow.fields.String('<p>Html page Content !</p>')
|
433
|
449
|
|
434
|
450
|
|