Attachment is always `null` in Notes API
Summary
When using the Notes API, I expect the attachment
field to contain a URL to the attached file. Instead it is always null
.
Steps to reproduce
- Add a comment to an Issue or Merge Request and attach a file
- Fetch the new comment (Note) through the API
- Inspect the
attachment
field
What is the current bug behavior?
The attachment
field is null
.
What is the expected correct behavior?
The attachment field should contain a URL to the attached file.
Output of checks
This bug happens on GitLab.com
Possible fixes
A few possibilities:
- Since the
attachment
field does not do anything, it is misleading and should be removed. - The
attachment
field could be replaced with anattachments
field which supplies the URLs for all attachments. In this case, we should probably do this for all resources that have attachments (see #28460 (moved))