diff --git a/src/resources.py b/src/resources.py new file mode 100644 index 0000000..e69de29 diff --git a/src/schemas.py b/src/schemas.py index 5d1c32f..dc39fd5 100644 --- a/src/schemas.py +++ b/src/schemas.py @@ -14,12 +14,36 @@ __module_name__ = "schemas" __version__text__ = "1" -class SampleSchema(ma.Schema): +class ServiceSchema(ma.Schema): """ Parameters: - - date (date) - - device_id (int) + - location (ipv4) + - zone (string) """ - date = fields.DateTime(required=True) - device_id = fields.Integer(required=True) + location = fields.IPv4(required=True) + zone = fields.String(required=True) + + +class ServiceDirectorySchema(ma.Schema): + """ + Parameters: + - name (string) + - id (uuid) + """ + + name = fields.String(required=True) + id = fields.UUID(required=True) + + +class ServiceLocatorSchema(ma.Schema): + """ + Parameters: + - name (string) + - id (uuid) + - servicearray (object) + """ + + name = fields.String(required=True) + id = fields.UUID(required=True) + servicearray = fields.Nested(ServiceSchema, many=True, required=True)