When I want the file schema.yml make with spectacular show in error assert isinstance(model_field, models.Field)

26 Views Asked by At

I want with using drf-spectacular to django But I get this error :

File "/usr/local/lib/python3.11/site-packages/drf_spectacular/openapi.py", line 515, in _resolve_path_parameters schema = self._map_model_field(model_field, direction=None) File "/usr/local/lib/python3.11/site-packages/drf_spectacular/openapi.py", line 565, in _map_model_field assert isinstance(model_field, models.Field) AssertionError

REST_FRAMEWORK = { "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", }

versions:

  • python = "^3.11"
  • django = "^5.0.0"
  • pillow = "^10.1.0"
  • djangorestframework = "^3.14.0"
  • djangorestframework-simplejwt = "^5.3.1"
  • celery = "^5.3.6"
  • flower = "^2.0.1"
  • mysqlclient = "^2.2.1"
  • django-filter = "^23.5.0"
  • pycryptodome = "^3.19.0"
  • gunicorn = "^21.2.0"
  • whitenoise = "6.6.0"
  • django-cors-headers = "^4.3.1"

drf-spectacular = "^0.27.0"

0

There are 0 best solutions below