ISBN normalization API

RCA Group

None

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).

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:

  • 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

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Kruthi Vuppala July 15, 2019 at 8:15 PM

3. Invalid ISBN:

RESPONSE:

4. Convert ISBN to 10

RESPONSE:

5. Convert to ISBN 13:

RESPONSE:

Kruthi Vuppala July 15, 2019 at 6:31 PM

verified on folio-testing:
1. GET isbn/validator with no query parameters

RESPONSE:

2. Valid ISBN:

RESPONSE:

Aliaksandr Pautau July 15, 2019 at 7:43 AM

  1. convertTo13 with valid ISBN-10

  2. convertTo13 with valid ISBN-13

  3. convertTo13 with invalid ISBN

  4. convertTo13 with invalid query

Aliaksandr Pautau July 15, 2019 at 7:32 AM
Edited

  1. convertTo10 with valid ISBN-13

  2. convertTo10 with valid ISBN-10

  3. convertTo10 with invalid ISBN

  4. convertTo10 with invalid query

Aliaksandr Pautau July 15, 2019 at 7:20 AM

Verified on folio-testing manually:

  1. Verify validator with valid ISBN-10

  2. Verify validator with valid ISBN-13

  3. Verify validator with invalid ISBN

  4. Verify validator with invalid query

Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Thunderjet

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created June 4, 2019 at 1:05 PM
Updated March 9, 2022 at 9:10 PM
Resolved July 15, 2019 at 8:15 PM
TestRail: Cases
TestRail: Runs