Class: Api::Messages::CommentIo
- Inherits:
-
Base
- Object
- Base
- Api::Messages::CommentIo
- Defined in:
- app/models/api/messages/comment_io.rb
Overview
A single batch can contain multiple comments. Since the current serialization model does not support mapping an array of objects directly to a single resource, this serializer uses a nested has_many association to represent multiple comments linked to one batch.
The serialized message follows this structure: { “comment”: { “comments”: [ { “comment_type”: “under_represented”, “comment_value”: “true”, “last_updated”: “2024-05-01T12:34:56Z”, “batch_id”: 123, “position”: 1, “tag_index”: 2 }, … ] } }
“`