Update AttachmentCreateRequest schema properties#57
Update AttachmentCreateRequest schema properties#57ramiro51 wants to merge 1 commit intofulcrumapp:v2from
Conversation
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.
There was a problem hiding this comment.
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 fromAttachmentCreateRequest. - Promoted
owners,name,file_size, andmetadatato top-level properties on the request schema.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "additionalProperties": false, | ||
| "properties": { | ||
| "owners": { | ||
| "type": "array", |
There was a problem hiding this comment.
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.
| "type": "array", | |
| "type": "array", | |
| "minItems": 1, |
| "AttachmentCreateRequest": { | ||
| "type": "object", | ||
| "required": [ | ||
| "attachment" | ||
| ], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "attachment": { | ||
| "type": "object", | ||
| "required": [ | ||
| "owners" | ||
| ], | ||
| "additionalProperties": false, | ||
| "properties": { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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?
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.