You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
{{ message }}
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
We currently have two different representations of entities: one in the REST API, usually defined as MediaTypes, and one in the "models" package.
The representation in the REST API is generated, and thus restricted to what can be expressed in the Goa DSL. Also, it is mixed in with stuff that is purely used for implementing the REST API (request payloads, for example)
The representation in the models package is used to store stuff in the database with Gorm. As such, it is not as expressive as we would like: for example, because JSON does not know a "DateTime" type, we are storing dates as integers in order to be able to do range queries on them (select from wi where created > '2016-01-01')
The question now is whether we should introduce an intermediate layer ("domain layer") where entities are represented in a manner that is both convenient and independent of REST or storage
The text was updated successfully, but these errors were encountered:
We currently have two different representations of entities: one in the REST API, usually defined as MediaTypes, and one in the "models" package.
The representation in the REST API is generated, and thus restricted to what can be expressed in the Goa DSL. Also, it is mixed in with stuff that is purely used for implementing the REST API (request payloads, for example)
The representation in the models package is used to store stuff in the database with Gorm. As such, it is not as expressive as we would like: for example, because JSON does not know a "DateTime" type, we are storing dates as integers in order to be able to do range queries on them (select from wi where created > '2016-01-01')
The question now is whether we should introduce an intermediate layer ("domain layer") where entities are represented in a manner that is both convenient and independent of REST or storage
The text was updated successfully, but these errors were encountered: