nelmio / NelmioApiDocBundle

Generates documentation for your REST API from annotations
MIT License
2.23k stars 833 forks source link

Schema of type "\App\Entity\TranslationInterface" can't be generated, no describer supports it. #2029

Open webspin opened 2 years ago

webspin commented 2 years ago

Hi,

When using the latest version of symfony (6.1) with "nelmio/api-doc-bundle": "^4.9", "knplabs/doctrine-behaviors": "^2.6", "jms/serializer-bundle": "^4.1",

I get the following error when using translationinterface & translationtraits: Schema of type "\App\Entity\TranslationInterface" can't be generated, no describer supports it. Class "\App\Entity\TranslationInterface" does not exist, did you forget a use statement, or typed it wrong?

I also cannot see in the stack trace about which of my models this is.

webspin commented 2 years ago

I migrated the models of an older application, but now nelmio tries to map ALL the entities (several 100), faults of every property without a docblock, and when i finally have the swagger ui present, it loads way too slow. How can I prevent Nelmio from mapping every entity, but just the ones I need with the properties I have chosen (with @expose etc) ?