def getModelRDB(): if request.method == 'POST': validation_error = validate_sql(request) if validation_error is not None: return validation_error # Test if client accepts the response content-type: application/json if 'Accept' not in request.headers.keys(): return error(400, "Client must accept content-type application/json") if 'application/json' not in request.headers['ACCEPT']: return error(400, "Client must accept content-type application/json in addition to {0}".format(request.headers['Accept'])) # FIXME: returning mocked results mocked_response = json.load(open('examples/response_catalogue_getModelRDB.json')) return jsonify(mocked_response)
def generateTriples(): if request.method == 'GET': model_id = request.args.get('model_id', None) if model_id is None: return error(400, "Parameter model_id must is mandatory") # TODO: generate Triples here return Response(status=200)