Skip to content

Conversation

@dragonee
Copy link
Owner

@dragonee dragonee commented Jan 4, 2026

Summary

  • Add AbsoluteURLSerializerMixin class providing shared get_url() method
  • Update 6 serializers to use the mixin instead of duplicate methods:
    • ObservationMadeSerializer
    • ObservationRecontextualizedSerializer
    • ObservationReinterpretedSerializer
    • ObservationReflectedUponSerializer
    • ObservationClosedSerializer
    • ObservationUpdatedEventSerializer
  • Net reduction of ~19 lines

Test plan

  • Verify observation API endpoints return correct absolute URLs
  • Test URL generation with and without request context

🤖 Generated with Claude Code

Add mixin class to eliminate 6 duplicate get_url() methods across
observation serializers, reducing code duplication.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dragonee dragonee merged commit efc0c36 into main Jan 4, 2026
2 checks passed
@dragonee dragonee deleted the refactor/create-url-serializer-mixin branch January 4, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants