Merge branch 'yaml_export' into feature/db_storage

This commit is contained in:
Daniel Schick 2023-03-17 08:50:24 +01:00
commit c88f55427d
4 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,13 @@
from flask import Blueprint, request
from webargs.flaskparser import parser
from marshmallow import Schema, fields
from ..schemas import model
from .. import impl
bp = Blueprint('berths', __name__)
@bp.route('/berths', methods=['get'])
def GetBerths():
return impl.berths.GetBerths()

View File

@ -1,3 +1,4 @@
from . import berths
from . import notifications
from . import participant
from . import shipcalls

View File

@ -0,0 +1,19 @@
import json
def GetBerths():
"""
"""
# Implement your business logic here
# All the parameters are present in the options argument
return json.dumps([{
"id": "<integer>",
"name1": "<string>",
"name2": "<string>",
}]), 200

View File

@ -1,6 +1,12 @@
from marshmallow import Schema, fields
class Berth(Schema):
id = fields.Int()
name1 = fields.String()
name2 = fields.String()
class Error(Schema):
message = fields.String(required=True,)
@ -57,6 +63,10 @@ class TimesId(Schema):
pass
class BerthList(Berth):
pass
class NotificationList(Notification):
pass