Work in progress, skeleton of the api created and testing started. Need to fix authentication tests.

This commit is contained in:
Nicholas Staples
2016-01-08 17:51:46 +00:00
parent 5bcc615825
commit 0bc4d02713
29 changed files with 193 additions and 95 deletions

20
app/schemas.py Normal file
View File

@@ -0,0 +1,20 @@
from marshmallow_sqlalchemy import ModelSchema
from . import models
class UserSchema(ModelSchema):
class Meta:
model = models.User
# TODO process users list, to return a list of user.id
# Should that list be restricted??
class ServiceSchema(ModelSchema):
class Meta:
model = models.Service
user_schema = ServiceSchema()
users_schema = UserSchema(many=True)
service_schema = ServiceSchema()
services_schema = ServiceSchema(many=True)