Skip to content
Open
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
70 changes: 31 additions & 39 deletions reference/rest-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,51 +552,43 @@
"AttachmentCreateRequest": {
"type": "object",
"required": [
"attachment"
"owners"
],
"additionalProperties": false,
"properties": {
"attachment": {
"type": "object",
"required": [
"owners"
],
"properties": {
"owners": {
"type": "array",
"description": "Array of owner objects for the attachment",
"items": {
"type": "object",
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"description": "Type of the owner (e.g., 'record', 'form')"
},
"id": {
"type": "string",
"description": "Identifier of the owner"
}
}
"owners": {
"type": "array",
"description": "Array of owner objects for the attachment",
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owners array is documented as requiring at least one owner for attachment creation, but the schema doesn’t enforce this. Consider adding minItems: 1 so client-side validation and generated SDKs match the API requirement.

Suggested change
"description": "Array of owner objects for the attachment",
"description": "Array of owner objects for the attachment",
"minItems": 1,

Copilot uses AI. Check for mistakes.
"items": {
"type": "object",
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"description": "Type of the owner (e.g., 'record', 'form')"
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The create-attachment endpoint description indicates owner type must be either record or form, but the schema allows any string. Consider constraining this field with an enum (or a pattern) so the schema matches the documented API behavior.

Suggested change
"description": "Type of the owner (e.g., 'record', 'form')"
"enum": [
"record",
"form"
],
"description": "Type of the owner (must be either 'record' or 'form')"

Copilot uses AI. Check for mistakes.
},
"id": {
"type": "string",
"description": "Identifier of the owner"
}
},
"name": {
"type": "string",
"description": "Name of the attachment"
},
"file_size": {
"type": "integer",
"description": "Size of the file in bytes"
},
"metadata": {
"type": "object",
"description": "Optional metadata for the attachment",
"additionalProperties": true
}
}
},
"name": {
"type": "string",
"description": "Name of the attachment"
},
"file_size": {
"type": "integer",
"description": "Size of the file in bytes"
},
"metadata": {
"type": "object",
"description": "Optional metadata for the attachment",
"additionalProperties": true
}
}
},
Expand Down
Loading