diff --git a/thermostat.py b/thermostat.py index 350237c..e77bfeb 100755 --- a/thermostat.py +++ b/thermostat.py @@ -200,18 +200,17 @@ Set_mode_resource_fields = { } Set_mode_model = api.model('Set_mode_Model', Set_mode_resource_fields) -#TODO: Add this to swagger documentation -#'Temporary forced modes (will stay in effect for '+str(int(forced_mode_duration))+' seconds):\n'\ -#+'\n'.join(['# /'+target+'\n' for target in targets])\ -#+'\n'\ -#+'Permanent forced modes:\n'\ -#+'\n'.join(['# /'+mode+'\n' for mode in modes]) +set_mode_description = 'Temporary forced modes (will stay in effect for '+str(int(forced_mode_duration))+' seconds):\n'\ + +'\n'.join(['# /'+target+'\n' for target in targets])\ + +'\n'\ + +'Permanent forced modes:\n'\ + +'\n'.join(['# /'+mode+'\n' for mode in modes]) @ns_thermostat.route('/set_mode') class Set_mode_thermostat(Resource): @auth_required @api.expect(Set_mode_model, validate=True) - @api.doc(description="My resource") + @api.doc(description=set_mode_description) def post(self): global new_forced_mode try: