Kind: Function
Source: atloria-monorepo/libs/parser-core/src/techdocs/cross-file-routes.ts
Fill in a DRF ModelSerializer's fields from the model it names.
class OutputSerializer(ModelSerializer): class Meta: model = BaseUser; fields = ("id", …)
describes a real response shape, but the field TYPES live in another file. This runs once
over the whole parse, where both halves are available.
A serializer whose model is not in the parse keeps no fields and therefore never becomes a component — better than a component with invented types. Returns how many were resolved.
Signature
tsfunction resolveDjangoSerializers(entities: Entity[]): number
Parameters
| Name | Type |
|---|---|
entities | Entity[] |
Returns: number
Was this page helpful?