Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SimulationReset(Request):
- @swagger.model
- class ResetRequest(object):
- """
- Represents a request for the API implemented by SimulationReset
- """
- resource_fields = {
- 'oldReset': fields.Boolean,
- 'robotPose': fields.Boolean,
- 'fullReset': fields.Boolean
- }
- required = ['oldReset', 'robotPose', 'fullReset']
- def put(self):
- for par in SimulationReset.ResetRequest.required:
- if par not in body:
- raise Exception('Missing parameter %s' % (par, ))
- for par in body:
- if par not in SimulationReset.ResetRequest.resource_fields:
- raise Exception('Invalid parameter %s' % (par, ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement