Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add field_serializer to computed_field #6965

Merged
merged 5 commits into from Aug 1, 2023

Conversation

andresliszt
Copy link
Contributor

@andresliszt andresliszt commented Jul 31, 2023

This PR tries to add field_seralizer into computed fields described in #6964

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @hramezani

@andresliszt
Copy link
Contributor Author

Updating unit tests

@andresliszt
Copy link
Contributor Author

please review

@adriangb
Copy link
Member

This looks good @andresliszt ! Can you add a test using Annotated[..., PlainSerializer()] as the return type from a computed field function?

@andresliszt
Copy link
Contributor Author

This looks good @andresliszt ! Can you add a test using Annotated[..., PlainSerializer()] as the return type from a computed field function?

done!, is that what you wanted? Thanks for the observation

@andresliszt andresliszt force-pushed the add/computed-field-serializers branch from 0501342 to d7adcec Compare August 1, 2023 03:26
@adriangb adriangb enabled auto-merge (squash) August 1, 2023 06:09
@adriangb adriangb merged commit de6fc67 into pydantic:main Aug 1, 2023
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants