@@ -59,7 +59,7 @@ class c{{path|variablesyntax}}Resource(Resource):
59
59
observable=True, allow_children=True)
60
60
self.payload = ""
61
61
self.resource_type = "{{query_rt(json_data,path)}}"
62
- self.content_type = "text/plain "
62
+ self.content_type = "application/vnd.ocf+cbor "
63
63
interfaces_array = {{query_if(json_data, path)}}
64
64
self.interface_type = str(interfaces_array[0]) + "," + str(interfaces_array[1])
65
65
{% - for methodName , method_data in path_data .items () %}
@@ -176,7 +176,7 @@ class OICRESResource(Resource):
176
176
self.value = 0
177
177
self.payload = str(self.value)
178
178
self.resource_type = "oic.wk.res {{device_type}}"
179
- self.content_type = "application/json " #application/cbor
179
+ self.content_type = "application/vnd.ocf+cbor " #application/cbor
180
180
self.interface_type = "oic.if.ll oic.if.baseline"
181
181
182
182
def render_GET_advanced(self, request, response):
@@ -270,7 +270,7 @@ class OICResource(Resource):
270
270
self.value = 0
271
271
self.payload = str(self.value)
272
272
self.resource_type = ""
273
- self.content_type = "application/cbor" #application/cbor
273
+ self.content_type = "application/vnd.ocf+ cbor" #application/cbor
274
274
self.interface_type = "oic.if.r" #, "oic.if.baseline"
275
275
276
276
def render_GET_advanced(self, request, response):
@@ -289,7 +289,7 @@ class OICSECResource(Resource):
289
289
self.value = 0
290
290
self.payload = str(self.value)
291
291
self.resource_type = ""
292
- self.content_type = "application/cbor" #application/cbor
292
+ self.content_type = "application/vnd.ocf+ cbor" #application/cbor
293
293
self.interface_type = "oic.if.r" #, "oic.if.baseline"
294
294
295
295
def render_GET_advanced(self, request, response):
@@ -309,7 +309,7 @@ class OICDResource(Resource):
309
309
self.value = 0
310
310
self.payload = str(self.value)
311
311
self.resource_type = "oic.wk.d {{device_type}}"
312
- self.content_type = "application/cbor" #application/cbor
312
+ self.content_type = "application/vnd.ocf+ cbor" #application/cbor
313
313
self.interface_type = "oic.if.r oic.if.baseline" #, "oic.if.baseline"
314
314
315
315
def render_GET_advanced(self, request, response):
@@ -365,7 +365,7 @@ class OICPResource(Resource):
365
365
self.value = 0
366
366
self.payload = str(self.value)
367
367
self.resource_type = "oic.wk.p"
368
- self.content_type = "application/cbor" #application/cbor
368
+ self.content_type = "application/vnd.ocf+ cbor" #application/cbor
369
369
self.interface_type = "oic.if.r" #, "oic.if.baseline"
370
370
371
371
def render_GET_advanced(self, request, response):
@@ -418,7 +418,7 @@ class introspectionResource(Resource):
418
418
{ "content-type": "application/cbor", "protocol": "coap", "url": "/ifile"}] }
419
419
self.payload = str(self.value)
420
420
self.resource_type = "oic.wk.introspection"
421
- self.content_type = "application/cbor"
421
+ self.content_type = "application/vnd.ocf+ cbor"
422
422
self.interface_type = "oic.if.r"
423
423
424
424
def render_GET_advanced(self, request, response):
@@ -453,7 +453,7 @@ class introspectionFileResource(Resource):
453
453
observable=True, allow_children=False)
454
454
self.payload = " illegal "
455
455
self.resource_type = "oic.wk.introspection"
456
- self.content_type = "application/cbor"
456
+ self.content_type = "application/vnd.ocf+ cbor"
457
457
self.interface_type = "oic.if.r"
458
458
459
459
def render_GET(self, request):
@@ -490,7 +490,7 @@ class OICDOXMResource(Resource):
490
490
self.value = 0
491
491
self.payload = str(self.value)
492
492
self.resource_type = "oic.r.doxm"
493
- self.content_type = "application/cbor" #application/cbor
493
+ self.content_type = "application/vnd.ocf+ cbor" #application/cbor
494
494
self.interface_type = "oic.if.rw" #, "oic.if.baseline"
495
495
496
496
def render_GET_advanced(self, request, response):
0 commit comments