Skip to content

Source DTO

tudorgroza edited this page Feb 11, 2021 · 1 revision

The general form of the DTO is listed below.

On creation:

  • id is NOT ACCEPTED
  • name is mandatory NOT EMPTY

In responses:

  • id is NOT EMPTY
  • created and lastUpdated follow a standard structure across all DTOs / objects
    • timestamp - always using the format: YYYY-MM-DDThh:mm:ss.ms+TZ
    • user - always containing name and email
{
  "id": "6024fe383780fe58086fda54",
  "name": "Source name",
  "description": "Description",
  "uri": "URL | File URI",
  "type": "LOCAL | REMOTE",
  "created": {
    "user": {
      "name": "Test User 1",
      "email": "[email protected]"
    },
    "timestamp": "2021-02-11T17:51:52.514+08:00"
  },
  "lastUpdated": {
    "user": {
      "name": "Test User 1",
      "email": "[email protected]"
    },
    "timestamp": "2021-02-11T17:51:52.514+08:00"
  }
}