I'm sure you have written the config twice in your settings.py, just make sure to remove the duplication and everything should be ok
REST_FRAMEWORK = { "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", }