django-rest-framework-gis icon indicating copy to clipboard operation
django-rest-framework-gis copied to clipboard

OpenAPI schema generation fails if the GeometryField is not in the model

Open AntoninRousset opened this issue 3 years ago • 1 comments

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.)

AntoninRousset avatar Dec 06 '21 13:12 AntoninRousset

@dhaval-mehta what do you think on this?

auvipy avatar Dec 11 '21 04:12 auvipy