From 9132ced6202dadd9c9fb1b342e1c87b7910146e9 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Thu, 5 Oct 2023 08:33:26 +0200 Subject: [PATCH] Fix API specification --- config/vufind/SearchApiRecordFields.yaml | 7 +------ themes/root/templates/searchapi/openapi.phtml | 13 +++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/config/vufind/SearchApiRecordFields.yaml b/config/vufind/SearchApiRecordFields.yaml index 399fe6d39d8..bb96633affd 100644 --- a/config/vufind/SearchApiRecordFields.yaml +++ b/config/vufind/SearchApiRecordFields.yaml @@ -14,9 +14,6 @@ accessRestrictions: authors: vufind.method: getDeduplicatedAuthors vufind.default: true - description: >- - Deduplicated author information including primary, corporate and secondary - authors $ref: '#/components/schemas/Authors' awards: vufind.method: getAwards @@ -130,9 +127,7 @@ formats: fullRecord: vufind.method: "Formatter::getFullRecord" description: Full metadata record (typically XML) - type: array - items: - type: string + type: string generalNotes: vufind.method: getGeneralNotes description: General notes diff --git a/themes/root/templates/searchapi/openapi.phtml b/themes/root/templates/searchapi/openapi.phtml index 7cc53b47552..bff2cd4340f 100644 --- a/themes/root/templates/searchapi/openapi.phtml +++ b/themes/root/templates/searchapi/openapi.phtml @@ -234,25 +234,26 @@ "schemas": { "Authors": { "type": "object", + "description": "Deduplicated author information including primary, corporate and secondary authors", "properties": { "primary": { "description": "Primary authors", - "type": "array", - "items": { + "type": "object", + "additionalProperties": { "$ref": "#/components/schemas/AuthorWithRoles" } }, "secondary": { "description": "Secondary authors", - "type": "array", - "items": { + "type": "object", + "additionalProperties": { "$ref": "#/components/schemas/AuthorWithRoles" } }, "corporate": { "description": "Corporate authors", - "type": "array", - "items": { + "type": "object", + "additionalProperties": { "$ref": "#/components/schemas/AuthorWithRoles" } }