From 8a599386641b7a0e2b5598d54a13a49b2a74f752 Mon Sep 17 00:00:00 2001 From: Barbara Czyz Date: Thu, 10 Aug 2023 13:50:12 +0200 Subject: [PATCH 1/3] Add integer value and note to metadata templ --- .../attributes/metadata_field--readable.yml | 75 +++++++++++++++++++ content/responses/metadata_template.yml | 2 +- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 content/attributes/metadata_field--readable.yml diff --git a/content/attributes/metadata_field--readable.yml b/content/attributes/metadata_field--readable.yml new file mode 100644 index 00000000..09f52c53 --- /dev/null +++ b/content/attributes/metadata_field--readable.yml @@ -0,0 +1,75 @@ +--- +title: Metadata Field (Write) + +description: |- + A field within a metadata template. Fields can be a basic text, date, or + number field, or a list of options. + +required: + - type + - key + - displayName + +type: object + +properties: + type: + type: string + example: string + description: |- + The type of field. The basic fields are a `string` field for text, a + `float` field for numbers, and a `date` fields to present the user with a + date-time picker. + + Additionally, metadata templates support an `enum` field for a basic list + of items, and ` multiSelect` field for a similar list of items where the + user can select more than one value. + + **Note**: The `integer` value is deprecated. + It is still present in the response, + but cannot be used in the POST request. + enum: + - string + - float + - date + - enum + - multiSelect + - integer + + key: + type: string + example: category + description: |- + A unique identifier for the field. The identifier must + be unique within the template to which it belongs. + maxLength: 256 + + displayName: + type: string + example: Category + description: |- + The display name of the field as it is shown to the user in the web and + mobile apps. + maxLength: 4096 + + description: + type: string + example: The category + description: |- + A description of the field. This is not shown to the user. + maxLength: 4096 + + hidden: + type: boolean + example: true + description: |- + Whether this field is hidden in the UI for the user and can only be set + through the API instead. + + options: + description: |- + A list of options for this field. This is used in combination with the + `enum` and `multiSelect` field types. + type: array + items: + $ref: "../attributes/metadata_option--writable.yml" diff --git a/content/responses/metadata_template.yml b/content/responses/metadata_template.yml index 1e2ea779..3e977b27 100644 --- a/content/responses/metadata_template.yml +++ b/content/responses/metadata_template.yml @@ -76,7 +76,7 @@ properties: number field, or a list of options. allOf: - - $ref: '../attributes/metadata_field--writable.yml' + - $ref: '../attributes/metadata_field--readable.yml' - properties: id: type: string From 82c9406824144d1a2ada4b230e887ba98a56a412 Mon Sep 17 00:00:00 2001 From: Barbara Czyz Date: Thu, 10 Aug 2023 14:13:50 +0200 Subject: [PATCH 2/3] Fix lint --- content/attributes/metadata_field--readable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/attributes/metadata_field--readable.yml b/content/attributes/metadata_field--readable.yml index 09f52c53..89ce5df5 100644 --- a/content/attributes/metadata_field--readable.yml +++ b/content/attributes/metadata_field--readable.yml @@ -25,7 +25,7 @@ properties: of items, and ` multiSelect` field for a similar list of items where the user can select more than one value. - **Note**: The `integer` value is deprecated. + **Note**: The `integer` value is deprecated. It is still present in the response, but cannot be used in the POST request. enum: From 59e369ab55b9bcec19986e735ea13d043f01ad9a Mon Sep 17 00:00:00 2001 From: Barbara Czyz Date: Thu, 10 Aug 2023 15:33:42 +0200 Subject: [PATCH 3/3] update metadata field attrib --- content/attributes/metadata_field--readable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/attributes/metadata_field--readable.yml b/content/attributes/metadata_field--readable.yml index 89ce5df5..c374c261 100644 --- a/content/attributes/metadata_field--readable.yml +++ b/content/attributes/metadata_field--readable.yml @@ -1,5 +1,5 @@ --- -title: Metadata Field (Write) +title: Metadata Field (Read) description: |- A field within a metadata template. Fields can be a basic text, date, or