Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3333

Exchanged attributes on createSchema endpoint on REST API (prefix <-> namespace)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: REST API
    • Labels:
      None
    • Attachments:
      1
    • Comments:
      1
    • Documentation Status:
      Not Required

      Description

      I'm creating some scripts for DSpace's 6 REST API and i've found out that the attributes of createSchema endpoint (POST/registries/schema) are exchanged. The requested prefix attribute ends up on namespace attribute and vice-versa.

      To confirm you may use the following command:

      Unable to find source-code formatter for language: bash. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      curl -k -4 --silent \
      --cookie "JSESSIONID=13E9E64BA335204ACA746805BC27D9F6" \
      -H "accept: application/json" \
      -H "Content-Type: application/json" \
      -X POST "https://demo.dspace.org/rest/registries/schema" \
      -d "{"prefix":"abc", "namespace":"https://defg.hij/"}"
      

      The result is:

      Unable to find source-code formatter for language: json. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      {"schemaID":5,"prefix":"https://defg.hij/","namespace":"abc","expand":[],"metadataFields":[],"fields":[]}
      

      It's also confirmed on XMLUI interface, as seen on attached file.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              brunonzanette Bruno Nocera Zanette
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: