Skip to content

Commit d0ab02c

Browse files
committed
Use custom Marshmallow APISpec plugin
1 parent 2d0748e commit d0ab02c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

labthings/server/labthing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from flask import url_for
22
from apispec import APISpec
3-
from apispec.ext.marshmallow import MarshmallowPlugin
3+
4+
# from apispec.ext.marshmallow import MarshmallowPlugin
45

56
from .names import (
67
EXTENSION_NAME,
@@ -14,6 +15,7 @@
1415
from .logging import LabThingLogger
1516
from .representations import LabThingsJSONEncoder
1617
from .spec.apispec import rule_to_apispec_path
18+
from .spec.apispec_plugins import MarshmallowPlugin
1719
from .spec.utilities import get_spec
1820
from .spec.td import ThingDescription
1921
from .decorators import tag
@@ -82,13 +84,15 @@ def __init__(
8284
self.log_handler = LabThingLogger()
8385
logging.getLogger().addHandler(self.log_handler)
8486

87+
# API Spec
8588
self.spec = APISpec(
8689
title=self.title,
8790
version=self.version,
8891
openapi_version="3.0.2",
8992
plugins=[MarshmallowPlugin()],
9093
)
9194

95+
# Thing description
9296
self.thing_description = ThingDescription(self.spec)
9397

9498
if app is not None:

0 commit comments

Comments
 (0)