More Marshmallow argument updates
This commit is contained in:
parent
e22f36b308
commit
9dbb083ee7
18 changed files with 102 additions and 87 deletions
|
|
@ -10,8 +10,8 @@ from openflexure_microscope.api.v2.views.captures import CaptureSchema
|
|||
|
||||
|
||||
class CaptureResizeSchema(Schema):
|
||||
width = fields.Integer(example=640, required=True)
|
||||
height = fields.Integer(example=480, required=True)
|
||||
width = fields.Integer(metadata={"example":640}, required=True)
|
||||
height = fields.Integer(metadata={"example": 480}, required=True)
|
||||
|
||||
|
||||
class BasicCaptureArgs(Schema):
|
||||
|
|
@ -23,10 +23,10 @@ class BasicCaptureArgs(Schema):
|
|||
|
||||
|
||||
class FullCaptureArgs(BasicCaptureArgs):
|
||||
filename = fields.String(example="MyFileName")
|
||||
filename = fields.String(metadata={"example": "MyFileName"})
|
||||
temporary = fields.Boolean(load_default=False, metadata={"description": "Delete capture on shutdown"})
|
||||
annotations = fields.Dict(load_default={}, example={"Client": "SwaggerUI"})
|
||||
tags = fields.List(fields.String, load_default=[], example=["docs"])
|
||||
annotations = fields.Dict(load_default={}, metadata={"example": {"Client": "SwaggerUI"}})
|
||||
tags = fields.List(fields.String, load_default=[], metadata={"example": ["docs"]})
|
||||
|
||||
|
||||
class CaptureAPI(ActionView):
|
||||
|
|
@ -113,7 +113,7 @@ class GPUPreviewStartAPI(ActionView):
|
|||
in the format ``[x, y, width, height]``.
|
||||
"""
|
||||
|
||||
args = {"window": fields.List(fields.Integer, load_default=[], example=[0, 0, 640, 480])}
|
||||
args = {"window": fields.List(fields.Integer, load_default=[], metadata={"example": [0, 0, 640, 480]})}
|
||||
|
||||
def post(self, args):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue