We found that serializing the entity in the use case forces us to deal with presentation concerns (serialization format, [] vs {}, ...) in the business layer. We will change the response objects to either contain entities or read models, and serialize later in the life-cycle.
Description
Description
Details
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | WMDE-leszek | T307913 🟫️ Don't use serialized entity data in use case responses | |||
Resolved | WMDE-leszek | T308432 🟫️ Serialize in presentation layer for GetItemStatements | |||
Resolved | WMDE-leszek | T308437 🟫️ Change `GetItem` use case to return an `ItemData` object in the response | |||
Resolved | WMDE-leszek | T308438 🟫️ Don't use serialized entity data in `GetItemStatement` use case response |
Event Timeline
Comment Actions
Change 790379 had a related patch set uploaded (by Jakob; author: Jakob):
[mediawiki/extensions/Wikibase@master] REST: Add ADR 2 - Don't serialize in use cases
Comment Actions
Change 790379 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] REST: Add ADR 2 - Don't serialize in use cases
Comment Actions
- change GetItem use case to return an ItemData object in the response (@Ollie.Shotton_WMDE creates task)
- create ItemData class
- instantiate ItemData in the use case (to be moved into the retriever as part of T307915)
- create ItemDataSerializer
- serialize in presenter
- change GetItemStatements to return a StatementList (@Jakob_WMDE creates task)
- serialize in presenter
- change GetItemStatement to return a Statement (@Ollie.Shotton_WMDE creates task)
- serialize in presenter
Comment Actions
Change 793408 had a related patch set uploaded (by Jakob; author: Jakob):
[mediawiki/extensions/Wikibase@master] REST: Remove EmptyArrayToObjectConverter
Comment Actions
Change 793408 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] REST: Remove EmptyArrayToObjectConverter