Skip to content

Commit c2c0085

Browse files
author
Joel Collins
committed
Tidied up comments
1 parent bc8ddc5 commit c2c0085

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/labthings/view/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,18 @@ def represent_response(self, response):
114114

115115
class ActionView(View):
116116
# Data formatting
117-
schema: Schema = None
118-
args: dict = None
119-
semtype: str = None
117+
schema: Schema = None # Schema for Action response
118+
args: dict = None # Schema for input arguments
119+
semtype: str = None # Semantic type string
120120

121121
# Spec overrides
122122
content_type = "application/json" # Input contentType
123123
response_content_type = "application/json" # Output contentType
124124
responses = {} # Custom responses for invokeaction
125125

126126
# Spec parameters
127-
safe: bool = False
128-
idempotent: bool = False
127+
safe: bool = False # Does the action complete WITHOUT changing the Thing state
128+
idempotent: bool = False # Can the action be performed idempotently
129129

130130
# Internal
131131
_cls_tags = {"actions"}
@@ -235,12 +235,12 @@ def dispatch_request(self, *args, **kwargs):
235235

236236

237237
class PropertyView(View):
238-
schema: Schema = None
239-
semtype: str = None
238+
schema: Schema = None # Schema for input AND output
239+
semtype: str = None # Semantic type string
240240

241241
# Spec overrides
242242
content_type = "application/json" # Input and output contentType
243-
responses = {} # Custom responses for invokeaction
243+
responses = {} # Custom responses for all interactions
244244

245245
_cls_tags = {"properties"}
246246

0 commit comments

Comments
 (0)