From 375fe2c9dff86a38ac71f28e8571b15c10fc865e Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Tue, 29 Oct 2024 17:11:34 +0000 Subject: [PATCH] Bug 38262: Add extended attributes support to vendors API specification Updates the OpenAPI definitions to support additional fields on vendor records. This adds: - extended_attributes array field to vendor schema definition - _strings field for localized/computed string representations - extended_attributes and +strings to available embed options These changes allow the API to expose and accept additional field data when retrieving or modifying vendor records via the REST API. Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- api/v1/swagger/definitions/vendor.yaml | 10 ++++++++++ api/v1/swagger/paths/acquisitions_vendors.yaml | 4 ++++ api/v1/swagger/paths/extended_attribute_types.yaml | 1 + 3 files changed, 15 insertions(+) diff --git a/api/v1/swagger/definitions/vendor.yaml b/api/v1/swagger/definitions/vendor.yaml index 1a759b2ff9e..a35fbb57a62 100644 --- a/api/v1/swagger/definitions/vendor.yaml +++ b/api/v1/swagger/definitions/vendor.yaml @@ -156,6 +156,16 @@ properties: - integer - "null" description: Number of linked invoices + extended_attributes: + description: Related additional field values + type: + - array + items: + $ref: extended_attribute_value.yaml + _strings: + type: + - object + - "null" additionalProperties: false required: - name diff --git a/api/v1/swagger/paths/acquisitions_vendors.yaml b/api/v1/swagger/paths/acquisitions_vendors.yaml index 73839cd3423..76bf9ea08a7 100644 --- a/api/v1/swagger/paths/acquisitions_vendors.yaml +++ b/api/v1/swagger/paths/acquisitions_vendors.yaml @@ -38,6 +38,8 @@ - baskets+count - subscriptions+count - invoices+count + - extended_attributes + - +strings collectionFormat: csv responses: "200": @@ -156,6 +158,8 @@ - interfaces - contacts - contracts + - extended_attributes + - +strings collectionFormat: csv produces: - application/json diff --git a/api/v1/swagger/paths/extended_attribute_types.yaml b/api/v1/swagger/paths/extended_attribute_types.yaml index eba7aec9017..4b7b56d71b7 100644 --- a/api/v1/swagger/paths/extended_attribute_types.yaml +++ b/api/v1/swagger/paths/extended_attribute_types.yaml @@ -23,6 +23,7 @@ - package - order - subscription + - vendor - $ref: "../swagger.yaml#/parameters/match" - $ref: "../swagger.yaml#/parameters/order_by" - $ref: "../swagger.yaml#/parameters/page" -- 2.51.1