Uploaded image for project: 'mod-entities-links'
  1. mod-entities-links
  2. MODELINKS-123

Authority-source-files API: update POST endpoint

    XMLWordPrintable

Details

    • 5
    • Spitfire
    • Quesnelia (R1 2024)
    • TBD

    Description

      Purpose
      This story focuses on updating the POST endpoint of the Authority-Source-Files API to accommodate a revised schema for the request body. The new schema includes specific constraints such as creating records with a "local" source and a single prefix. Additionally, the ability to specify the start number for the HRID sequence is included.

      Approach

      1. Develop a new schema for the POST request body of the Authority-Source-Files API.
      2. Allow the creation of records only with a "local" source and a single prefix only.
      3. Implement functionality to specify the start number for the HRID sequence and creating a sequence.
      4. Add sequence_name varchar field to authority_source_file table.
      5. Add selectable boolean field to authority_source_file table with default false.

      Request Body Example:

      {
        "id": "uuid",
        "name": "string",
        "code": "string",
        "type": "string",
        "baseUrl": "string",
        "selectable": true,
        "hridManagement": {
          "startNumber": 1
        }
      }
      

      Required fields: name, code
      Default values: selectable=true, startNumber=1

      Remove existing "required" constraints for non-required fields

      "source" in database should be required
       

      Acceptance criteria

      • Covered by unit tests
      • Module documentation updated
      • Logging is well-defined

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                Shans Shans Kaluhin
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:

                  TestRail: Runs

                    TestRail: Cases