Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add integer value to metadata template response #344

Merged
merged 3 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions content/attributes/metadata_field--readable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Metadata Field (Read)

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"
2 changes: 1 addition & 1 deletion content/responses/metadata_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down