django-rest-framework-gis
django-rest-framework-gis copied to clipboard
OpenAPI schema generation fails if the GeometryField is not in the model
This piece of code will cause the schema generation to fail if the GeometryField is not in the model, e.g. it is an annotation or a custom property.
I don't see any simple solution (without custom get_field), beside having multiple serializer fields: PointField, LineStringField, etc.)
@dhaval-mehta what do you think on this?