I’m working on a FastAPI backend that generates different types of content (social posts, blogs, emails).
Many responses share common fields (id, metadata, generated text), but each format also has some unique fields.
Right now I’ve created separate response models for each type, but there’s a lot of duplication.
I’m considering:
- using a base model and extending it
- or keeping separate models for clarity
What’s the recommended way to structure response models in FastAPI for this kind of use case?