Skip to content

Commit

Permalink
feat(search-instances): add additional fields in basic response
Browse files Browse the repository at this point in the history
Closes: MSEARCH-686
Signed-off-by: psmagin <[email protected]>
  • Loading branch information
psmagin committed Feb 28, 2024
1 parent 631fb52 commit aef88ed
Show file tree
Hide file tree
Showing 8 changed files with 455 additions and 142 deletions.
56 changes: 54 additions & 2 deletions src/main/resources/model/instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,20 @@
"type": "object",
"properties": {
"id": {
"showInResponse": [ "search" ],
"index": "keyword"
},
"tenantId": {
"index": "keyword",
"showInResponse": [ "call-number-browse" ]
"showInResponse": [ "search", "call-number-browse" ]
},
"hrid": {
"index": "keyword"
},
"holdingsRecordId": {
"showInResponse": [ "search" ],
"index": "source"
},
"accessionNumber": {
"index": "source"
},
Expand All @@ -286,12 +291,13 @@
"index": "source"
},
"barcode": {
"showInResponse": [ "search" ],
"index": "keyword"
},
"effectiveLocationId": {
"searchTypes": [ "facet", "filter" ],
"index": "keyword",
"showInResponse": [ "call-number-browse" ]
"showInResponse": [ "search", "call-number-browse" ]
},
"statisticalCodeIds": {
"searchTypes": [ "facet", "filter" ],
Expand All @@ -301,6 +307,7 @@
"type": "object",
"properties": {
"name": {
"showInResponse": [ "search" ],
"searchTypes": [ "facet", "filter", "sort" ],
"index": "keyword",
"sort": {
Expand All @@ -312,6 +319,7 @@
}
},
"materialTypeId": {
"showInResponse": [ "search" ],
"searchTypes": [ "facet", "filter" ],
"index": "keyword"
},
Expand All @@ -323,6 +331,26 @@
"itemLevelCallNumberTypeId": {
"index": "keyword"
},
"copyNumber": {
"showInResponse": [ "search" ],
"index": "source"
},
"volume": {
"showInResponse": [ "search" ],
"index": "source"
},
"enumeration": {
"showInResponse": [ "search" ],
"index": "source"
},
"chronology": {
"showInResponse": [ "search" ],
"index": "source"
},
"yearCaption": {
"showInResponse": [ "search" ],
"index": "source"
},
"effectiveCallNumberComponents": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -376,6 +404,10 @@
}
}
},
"temporaryLoanTypeId": {
"showInResponse": [ "search" ],
"index": "source"
},
"administrativeNotes": {
"index": "multilang"
},
Expand Down Expand Up @@ -434,9 +466,11 @@
"type": "object",
"properties": {
"id": {
"showInResponse": [ "search" ],
"index": "keyword"
},
"tenantId": {
"showInResponse": [ "search" ],
"searchTypes": [ "facet", "filter" ],
"index": "keyword"
},
Expand All @@ -449,6 +483,7 @@
"index": "keyword"
},
"permanentLocationId": {
"showInResponse": [ "search" ],
"searchTypes": [ "facet", "filter" ],
"index": "keyword"
},
Expand All @@ -457,6 +492,7 @@
"index": "keyword"
},
"discoverySuppress": {
"showInResponse": [ "search" ],
"$type": "suppress"
},
"hrid": {
Expand Down Expand Up @@ -493,6 +529,22 @@
}
}
},
"copyNumber": {
"showInResponse": [ "search" ],
"index": "source"
},
"callNumberPrefix": {
"showInResponse": [ "search" ],
"index": "source"
},
"callNumber": {
"showInResponse": [ "search" ],
"index": "source"
},
"callNumberSuffix": {
"showInResponse": [ "search" ],
"index": "source"
},
"administrativeNotes": {
"index": "multilang"
},
Expand Down
194 changes: 137 additions & 57 deletions src/main/resources/swagger.api/schemas/holding.json
Original file line number Diff line number Diff line change
@@ -1,91 +1,171 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Holding description",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the holding record"
"acquisitionFormat": {
"description": "Format of holdings record acquisition",
"type": "string"
},
"tenantId": {
"description": "Tenant ID",
"acquisitionMethod": {
"description": "Method of holdings record acquisition",
"type": "string"
},
"permanentLocationId": {
"type": "string",
"description": "The permanent shelving location in which an item resides."
"administrativeNotes": {
"description": "Administrative notes",
"items": {
"type": "string"
},
"type": "array"
},
"discoverySuppress": {
"type": "boolean",
"description": "Indicates that the record should not be displayed in a discovery system"
"callNumber": {
"description": "Call Number is an identifier assigned to an item, usually printed on a label attached to the item.",
"type": "string"
},
"hrid": {
"type": "string",
"description": "the human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
"callNumberPrefix": {
"description": "Prefix of the call number on the holding level.",
"type": "string"
},
"sourceId": {
"description": "(A reference to) the source of a holdings record",
"callNumberSuffix": {
"description": "Suffix of the call number on the holding level.",
"type": "string"
},
"callNumberTypeId": {
"description": "unique ID for the type of call number on a holdings record, a UUID",
"type": "string"
},
"copyNumber": {
"description": "Item/Piece ID (usually barcode) for systems that do not use item records. Ability to designate the copy number if institution chooses to use copy numbers.",
"type": "string"
},
"digitizationPolicy": {
"description": "Records information regarding digitization aspects.",
"type": "string"
},
"discoverySuppress": {
"description": "records the fact that the record should not be displayed in a discovery system",
"type": "boolean"
},
"effectiveLocationId": {
"description": "Effective location is calculated by the system based on the values in the permanent and temporary locationId fields.",
"type": "string"
},
"electronicAccess": {
"description": "List of electronic access items",
"items": {
"$ref": "electronicAccess.json"
},
"type": "array"
},
"formerIds": {
"type": "array",
"description": "Previous identifiers assigned to the holding",
"description": "Previous ID(s) assigned to the holdings record",
"items": {
"type": "string"
}
},
"type": "array"
},
"statisticalCodeIds": {
"type": "array",
"description": "List of statistical code IDs",
"holdingsStatements": {
"description": "Holdings record statements",
"items": {
"type": "string",
"description": "UUID for a statistical code"
}
"$ref": "holdingsStatement.json"
},
"type": "array"
},
"tags": {
"description": "arbitrary tags associated with this holding",
"$ref": "tags.json"
"holdingsStatementsForIndexes": {
"description": "Holdings record indexes statements",
"items": {
"$ref": "holdingsStatement.json"
},
"type": "array"
},
"holdingsStatementsForSupplements": {
"description": "Holdings record supplements statements",
"items": {
"$ref": "holdingsStatement.json"
},
"type": "array"
},
"holdingsTypeId": {
"type": "string",
"description": "unique ID for the type of this holdings record, a UUID"
"description": "unique ID for the type of this holdings record, a UUID",
"type": "string"
},
"callNumberPrefix": {
"type": "string",
"description": "Prefix of the call number on the holding level."
"hrid": {
"description": "the human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID",
"type": "string"
},
"callNumber": {
"type": "string",
"description": "Call Number is an identifier assigned to an item, usually printed on a label attached to the item."
"id": {
"description": "the unique ID of the holdings record; UUID",
"type": "string"
},
"callNumberSuffix": {
"type": "string",
"description": "Suffix of the call number on the holding level."
"illPolicyId": {
"description": "unique ID for an ILL policy, a UUID",
"type": "string"
},
"electronicAccess": {
"type": "array",
"description": "List of electronic access items",
"items": {
"$ref": "electronicAccess.json"
}
"instanceId": {
"description": "Inventory instances identifier",
"type": "string"
},
"administrativeNotes": {
"type": "array",
"description": "Administrative notes",
"items": {
"type": "string"
}
"metadata": {
"$ref": "metadata.json"
},
"notes": {
"type": "array",
"description": "Notes about action, copy, binding etc.",
"items": {
"$ref": "note.json"
}
},
"type": "array"
},
"metadata": {
"$ref": "metadata.json"
"numberOfItems": {
"description": "Text (Number)",
"type": "string"
},
"permanentLocationId": {
"description": "The permanent shelving location in which an item resides.",
"type": "string"
},
"receiptStatus": {
"description": "Receipt status (e.g. pending, awaiting receipt, partially received, fully received, receipt not required, and cancelled)",
"type": "string"
},
"receivingHistory": {
"$ref": "holdingsReceivingHistory.json",
"description": "Receiving history of holdings record"
},
"retentionPolicy": {
"description": "Records information regarding how long we have agreed to keep something.",
"type": "string"
},
"shelvingTitle": {
"description": "Indicates the shelving form of title.",
"type": "string"
},
"sourceId": {
"description": "(A reference to) the source of a holdings record",
"type": "string"
},
"statisticalCodeIds": {
"description": "List of statistical code IDs",
"items": {
"description": "UUID for a statistical code",
"type": "string"
},
"type": "array"
},
"tags": {
"$ref": "tags.json",
"description": "arbitrary tags associated with this holding"
},
"tenantId": {
"description": "Tenant ID",
"type": "string"
},
"temporaryLocationId": {
"description": "Temporary location is the temporary location, shelving location, or holding which is a physical place where items are stored, or an Online location.",
"type": "string"
}
},
"required": ["electronicAccess", "notes"]
"required": [
"electronicAccess",
"notes"
],
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Receiving history of holdings record",
"type": "object",
"properties": {
"displayType": {
"type": "string",
"description": "Display hint. 1: Display fields separately. 2: Display fields concatenated"
},
"entries": {
"type": "array",
"description": "Entries of receiving history",
"items": {
"$ref": "holdingsReceivingHistoryEntry.json"
}
}
}
}

Loading

0 comments on commit aef88ed

Please sign in to comment.