mattermost-api-reference
mattermost-api-reference copied to clipboard
[MM-42897] - Remove reference to removed cloud endpoints
/update-branch
@marianunez do you have an idea why the build for this is failing?
@marianunez do you have an idea why the build for this is failing?
I'm not sure, looking at the failed build step log
Data does not match any schemas from 'oneOf' at #/paths//cloud/webhook/post/responses/501
Additional properties not allowed: /permissions/ancillary at #/paths//cloud/webhook/post/responses/501
Missing required property: $ref at #/paths//cloud/webhook/post/responses/501
It seems that is having trouble with the format of that endpoint responses. Maybe it's missing the EOF there?
/update-branch
@AGMETEOR - Is there anything left outstanding in this PR preventing it from being merged?
@AGMETEOR - Are you open to investigating and resolving the build issues associated with this PR?
@neallred - Are you open to helping resolve the code-level issues that are preventing this API docs PR from being merged into production?
/update-branch
Fixed. To add context, the issue was the missing EOF character (end of file, a \n
newline character at the end of the last line).
Unix (i.e Mac, Linux) by convention requires EOF characters to be present for the file to be considered a text file.
More context on this standard:
- https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline/729725#729725
- https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file/18789#18789
The build tool relies on this assumption and simply pastes all the files together. Since the EOF was missing, it messed up the concatenated file output whitespace. The output document is a yaml document, and in yaml whitespace matters, so the file wasn't valid.
Editors can be configured to do an EOF character or not:
- https://thoughtbot.com/blog/no-newline-at-end-of-file
To resolve confusion about why the original attempt didn't re-add the EOF if it ended a newline, the answer is it inserted \n\s\s\s\s\s\s\s\s
(a new line, but the new line didn't have a newline character at the end of its line).
You can see that visually in this highlighted diff. There's a new line with some space characters (the shade of gray changes where the spaces stop), and then to help visualize the missing \n, it says no new line at end of file)