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

Default SerializerMethodField's help_text to the docstring of the method

Open coderanger opened this issue 4 years ago • 4 comments

Description

Just a nice little default that occurred to me tonight. We're using the automatic OpenAPI generation stuff so the help text on serializer fields ends up visible in that, and I would have copied the same text into both.

coderanger avatar Dec 09 '21 03:12 coderanger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 18 '22 05:04 stale[bot]

Still here.

coderanger avatar Apr 18 '22 05:04 coderanger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 18 '22 23:06 stale[bot]

Can someone merge this?

coderanger avatar Jun 19 '22 01:06 coderanger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 19 '22 05:10 stale[bot]

  1. I prefer the behaviour you've got here.
  2. Changing this for existing APIs might not be ideal for some folks.

So?...

lovelydinosaur avatar Oct 19 '22 10:10 lovelydinosaur

@tomchristie It wouldn't affect anyone that has explicit help text defined. I guess the worry is this would expose __doc__ which might have something sensitive in it?

coderanger avatar Oct 29 '22 07:10 coderanger