Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

MODCAT-211: Create a new API to delete an authority #454

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

LeireDiez
Copy link
Contributor

@LeireDiez LeireDiez commented Nov 13, 2020

Purpose

MODCAT-211 Create a new API to delete an authority

Approach

  • Create an API to delete an authority
    • If the heading of the authority is used in bibliographic, authority is not deleted and it returns with an HTTP status code 423
    • If the heading of the authority is not used, it is also deleted
  • Unit tests updates:
    • Units tests have been added to test the response status

TODOS and Open Questions

Learning

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • Does this introduce breaking changes?
    • Were any API paths or methods changed, added or removed?
    • Were there any schema changes?
    • Did any of the interface versions change?
    • Were permissions changed, added, or removed?
    • Are there new interface dependencies?
    • There are no breaking changes in this PR.

While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.

@@ -10,7 +10,7 @@
"provides": [
{
"id": "marccat",
"version": "2.1",
"version": "2.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the version

String url = getURI("/marccat/authority-record");
Map<String, String> headers = addDefaultHeaders(url, StorageTestSuite.TENANT_ID);
String templateJson = IOUtils.toString(this.getClass().getResourceAsStream("/authority/name.json"),
String.valueOf(StandardCharsets.UTF_8));

Response myResponse =
given().headers("Content-Type", "application/json").headers(headers).queryParam("view", "-1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reformat the code

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

80.6% 80.6% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_275) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 11.
Read more here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants