plone / plone/plone.restapi

@history endpoint normalization

Open
#620 0 comments 0 reactions 1 assignee View on GitHub

@tisto is already working on this.

Since Sep 21, 2018.

04 type: enhancement
Dominant language
Python
Stars
109
Forks
107
Avg merge
2d 3h
Merged PRs (30d)
4

Description

@history endpoint returns a list of changes on the object which may be different depending on the action. Right now the specific attributes for each kind of change are normalized at the same level of the history information which makes difficult to validate as a json schema and scale to more kind of possible actions.

My proposal that we implemented on guillotina is:

[{
    'actor': ID_USER,
    'comments': COMMENTS,
    'time': TIME_OF_THE_ACTION,
    'title': TITLE,
    'type': 'workflow',
    'data': {
         'action': ID_ACTION,
         'review_state': REVIEW_STATE,
    }
},
{
    'actor': ID_USER,
    'comments': COMMENTS,
    'time': TIME_OF_THE_ACTION,
    'title': TITLE,
    'type': 'version',
    'data': {
         'version': ID_VERSION,
         'may_revert': IS_POSSIBLE_TO_REVERT,
    }
}]

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.