0

Swagger ドキュメントをより簡単に統合するために、 Flask-restfulアプリをFlask-RESTPlusにリファクタリングしています。

http://localhost:8080/api名前空間とモデルを使用してエンドポイントを定義しましたhttp://localhost:8080/api/myendpoint。しかし、経由でエンドポイントを使用すると

curl -X POST --header 'Content-Type: application/json' -d '{ "info": "bla bla bla" } 'http://localhost:2700/api/myendpoint/'

次のトレースバックを受け取ります。

Traceback (most recent call last):
  File "C:\venv\lib\site-packages\flask\app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\venv\lib\site-packages\flask\app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "C:\venv\lib\site-packages\flask_restplus\api.py", line 536, in error_router
    return original_handler(e)
  File "C:\venv\lib\site-packages\flask\app.py", line 1569, in handle_exception
    raise e
AssertionError

トレースバックがソースを指していないため、アプリでこのエラーが発生する原因がわかりません。むしろ、flask モジュールの内部スタックのみがリストされます。Flaskが不平を言う理由を見つける方法はありますか? アプリで提供するのを忘れた典型的なものはありますか?

4

0 に答える 0