Uploaded image for project: 'mod-inventory'
  1. mod-inventory
  2. MODINV-122

ISBN normalization API

    XMLWordPrintable

Details

    • ACQ Sprint 66, ACQ Sprint 67, ACQ Sprint 68
    • 3
    • Thunderjet

    Description

      Overview

      In order to facilitate the use of normalized ISBNs, particularly in search queries, an API is needed.

      It was determined that mod-inventory is a reasonable place for this API to live since it's a core module and "will always be there". That said, it should be easy to move later if desired since this API will define a new interface (see below)

      Approach

      The API should be defined under a new interface "isbn-utils".

      The folio-isbn-util shared library already exists and does most of the work, so we just need to create the API and call the util.

      API

      The API consists of 4 endpoints; two for performing isbn conversions and two for validating ISBNs w/o modification. The conversion endpoints support an optional query arg which allows you to add hyphens (defaults to false).

      GET /isbn/convertTo13?isbn=<10 or 13 isbn>&hyphens=<true|false> -> 200 or 400
      GET /isbn/convertTo10?isbn=<10 or 13 isbn>&hyphens=<true|false> -> 200 or 400
      GET /isbn/validator?isbn=<10 or 13 isbn> -> 200
      GET /isbn/validator?isbn10=<10 isbn> -> 200
      GET /isbn/validator?isbn13=<13 isbn> -> 200
      

      Responses/Schemas

      Validator Endpoints

      • Always return a 200. The response body is json response of true or false.

      ConvertTo* Endpoints

      • Return a 200 on success. The response body is a json object containing the converted isbn:
        {
          "isbn": "9788675309000"
        }
        
      • Return a 400 when an invalid ISBNs is provided. The response body should be an error json response indicating the problem.

      Acceptance Criteria

      • Schemas, RAML and Module Descriptors have been created/updated
      • Unit tests are updated

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                KVupp Kruthi Vuppala
                cmcnally Craig McNally
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases