GALAglobal / TAPICC

The Translation API Cases and Classes (TAPICC) initiative is a collaborative, community-driven, open-source project to advance API standards in the localization industry.
https://galaglobal.github.io/TAPICC/
Other
24 stars 3 forks source link

Validation of the Job submitter property #12

Closed ysavourel closed 6 years ago

ysavourel commented 6 years ago

When doing a POST on Job with this:

{
  "name": "string",
  "description": "string",
  "submitDate": "2018-03-23T21:42:50.205Z",
  "dueDate": "2018-03-23T21:42:50.205Z",
  "submitter": "test"
}

We get an error of type for submitter.

"invalidAttributes": {
    "submitter": [
      {
        "rule": "numeric",
        "message": "Value should be a numeric (instead of \"test\", which is a string)"
      }
    ]

Changing the value to "100" or 100 makes it work. But the model shows it's should be string.

Alino commented 6 years ago

based on the current Job model, it should be numeric type. The idea was to use user id here, maybe we should rename submitter to submitterId? To avoid confusion

Alino commented 6 years ago

Kamino closed and cloned this issue to GALAglobal/TAPICC-API-implementation