def __init__(self): self.parse=reqparse.copy() self.args = self.parse.parse_args()
reqparse.add_argument('title', type=str, required=True, help='No request title provided', location='json') reqparse.add_argument('description', type=str, required=True, help='No request description provided', location='json') reqparse.add_argument('category', type=str, required=True, help='Choose category', location='json') reqparse_copy = reqparse.copy() reqparse_copy.add_argument('title', type=str, required=False, location='json') reqparse_copy.add_argument('description', type=str, required=False, location='json') reqparse_copy.add_argument('category', type=str, required=False, help='choose category', location='json') class HelloWorld(Resource): def get(self): return {'hello': 'world'}