14 lines
420 B
Python
14 lines
420 B
Python
from marshmallow import Schema, fields, RAISE
|
|
from marshmallow.validate import Length
|
|
from .controller_schema import ControllerSchema
|
|
|
|
|
|
class JobSchema(Schema):
|
|
id = fields.Int(required=False, dump_only=True)
|
|
created_at = fields.DateTime(required=False, dump_only=True)
|
|
|
|
controllers = fields.Nested(ControllerSchema, many=True, required=True, validate=Length(min=1))
|
|
|
|
class Meta:
|
|
unknown = RAISE
|