Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust replace json patch to replace elements in folders #198

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

blankdots
Copy link
Contributor

@blankdots blankdots commented Feb 9, 2021

Description

Add option to replace tags in object added in folder

to patch items in folders you need to know the position of the element you are trying to patch in the array of metadataObjects or drafts:
currently it is enabled for tags add:

  {
            "op": "add",
            "path": "/metadataObjects/0/tags",
            "value": {"submissionType": "Form"},
        }

replace:

{
            "op": "replace",
            "path": "/metadataObjects/0/tags",
            "value": {"submissionType": "XML"},
        }

Related issues

CSCfi/metadata-submitter-frontend#144

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Changes Made

  1. Add option to replace tags content element
  2. fix bug, that prevented drafts been deleted correctly from users, and added tests for it.
  3. make assert fail messages clearer in integration tests

Testing

  • Integration Tests

Mentions

add integration tests and modify tags of element
@blankdots blankdots force-pushed the feature/replace_objects branch from d60c2c9 to 28fff17 Compare February 9, 2021 15:46
@blankdots blankdots self-assigned this Feb 9, 2021
@blankdots blankdots force-pushed the feature/replace_objects branch from 6bd944b to 6e6dc4e Compare February 9, 2021 18:12
@blankdots blankdots marked this pull request as ready for review February 9, 2021 18:12
@blankdots blankdots changed the title replace json patch to replace elements in folders adjust replace json patch to replace elements in folders Feb 10, 2021
Base automatically changed from feature/allow_put_xml_objects to develop February 10, 2021 08:15
@blankdots blankdots merged commit 1b219db into develop Feb 10, 2021
@blankdots blankdots deleted the feature/replace_objects branch February 10, 2021 08:16
@blankdots blankdots mentioned this pull request Feb 12, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants