from flask.views import MethodView
from apiflask import APIFlask
app = APIFlask(__name__)
@app.route('/pets/<int:pet_id>', endpoint='pet')
class Pet(MethodView):
def get(self, pet_id):
return {'message': 'OK'}
def delete(self, pet_id):
return '', 204
app.run(debug=True)