@fapp.route('/api/pet', methods=['POST', 'PUT'])
def pet():
    if request.method == 'POST':
        if pet_db.read_(request.json['id']) != None:
            return "", 409
        else:
            pet_db.create_(**request.json)
            return "", 200
    elif request.method == 'PUT':
        if not isinstance(request.json['id'], int):
            return "", 400
        if not pet_db.update_(**request.json):
            return "", 404
        else:
            return "", 200
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/contrib/client/test_flask.py/pet/original