I'm new to the developer sphere and the Python environment. As part of my apprenticeship, I'm working on a project to custom document a JS plugin. The project is set up with Django, drf-spectacular and redoc.
I already have several views in place to expose the methods, events and properties of the plugin. I am currently having difficulty formatting two User and Addresses models with exactly the same behavior as the Pet and Order models present on the Pet Store API. Depending on the type chosen, the model changes.
I've heard about Discriminator and PolymorphicSerializer but I'm a bit lost on what to do. I don't directly use the openapi schema. To generate the documentation, I run a script that will execute the npm command run bundle:standalone which will create the redoc.standalone.js that I then transfer to the Django static folder.
Would anyone have a research lead or similar experience with the technologies used ?
Thank you very much for your answers.
Best regards.