Skip to content

Update AttachmentCreateRequest schema properties#57

Open
ramiro51 wants to merge 1 commit intofulcrumapp:v2from
ramiro51:patch-1
Open

Update AttachmentCreateRequest schema properties#57
ramiro51 wants to merge 1 commit intofulcrumapp:v2from
ramiro51:patch-1

Conversation

@ramiro51
Copy link
Copy Markdown

The support team has noticed that the Create Attachment properties on the docs page are wrong. The attachment {} object should not be part of the request. The endpoint expects owners [] as parent of the object.

The support team has noticed that the Create Attachment properties on the docs page are wrong. The attachment {} object should not be part of the request. The endpoint expects owners [] as parent of the object.
@ramiro51 ramiro51 requested review from a team as code owners April 17, 2026 18:32
Copilot AI review requested due to automatic review settings April 17, 2026 18:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the OpenAPI schema for the “Create an attachment” request body so it matches the actual API contract (request fields at the top level rather than nested under an attachment object).

Changes:

  • Removed the attachment { ... } wrapper from AttachmentCreateRequest.
  • Promoted owners, name, file_size, and metadata to top-level properties on the request schema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread reference/rest-api.json
"additionalProperties": false,
"properties": {
"owners": {
"type": "array",
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

owners is required but the endpoint description says you must specify at least one owner. Add minItems: 1 to the owners array schema so the OpenAPI schema matches the documented/expected request validation.

Suggested change
"type": "array",
"type": "array",
"minItems": 1,

Copilot uses AI. Check for mistakes.
Comment thread reference/rest-api.json
Comment on lines 552 to +558
"AttachmentCreateRequest": {
"type": "object",
"required": [
"attachment"
],
"additionalProperties": false,
"properties": {
"attachment": {
"type": "object",
"required": [
"owners"
],
"additionalProperties": false,
"properties": {
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The indentation for AttachmentCreateRequest (e.g., the "type"/"required" lines) is inconsistent with surrounding schemas, which makes the OpenAPI file harder to maintain and produces noisy diffs. Please reformat this block to match the existing indentation pattern in components.schemas.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ramiro51 it looks like copilot does not work here (maybe because it's a public repo?) in any case, can you please take a look at these comments and make changes as you see fit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants