nextcloud / nextcloud/activity

Output of the API is not according to spec

Open
#330 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature: api technical debt
Dominant language
JavaScript
Stars
145
Forks
72
Avg merge
6d 9h
Merged PRs (30d)
42

Description

See:

{
   "activity_id":12672,
   "app":"core",
   "type":"security",
   "user":"tobi",
   "subject":"You successfully logged in using two-factor authentication (Nextcloud Notification)",
   "subject_rich":[
      "",
      [

      ]
   ],
   "message":"",
   "message_rich":[
      "",
      [

      ]
   ],
   "object_type":"",
   "object_id":0,
   "object_name":"",
   "objects":[
      ""
   ],
   "link":"",
   "icon":"http://10.0.2.2/nc/core/img/actions/password.svg",
   "datetime":"2018-12-18T10:10:24+00:00",
   "previews":[

   ]
}

As you can see the 'objects' for example is an array. As are the second argument of subject_rich etc. According to the specs these should be objects.,

cc: @tobiasKaminsky

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the reported JSON API response with the specification, focusing on objects and the second arguments of subject_rich and message_rich. Locate the response-generation entry point; done means these fields use the object shapes required by the specification and the API output matches it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.