mattermost-api-reference icon indicating copy to clipboard operation
mattermost-api-reference copied to clipboard

[MM-42897] - Remove reference to removed cloud endpoints

Open AGMETEOR opened this issue 2 years ago • 5 comments

Summary

Remove reference to removed cloud endpoints

Ticket Link

MM-42897

AGMETEOR avatar Apr 04 '22 07:04 AGMETEOR

/update-branch

AGMETEOR avatar Apr 05 '22 07:04 AGMETEOR

@marianunez do you have an idea why the build for this is failing?

AGMETEOR avatar Apr 05 '22 07:04 AGMETEOR

@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?

marianunez avatar Apr 06 '22 02:04 marianunez

/update-branch

AGMETEOR avatar May 04 '22 07:05 AGMETEOR

@AGMETEOR - Is there anything left outstanding in this PR preventing it from being merged?

cwarnermm avatar Jun 07 '22 18:06 cwarnermm

@AGMETEOR - Are you open to investigating and resolving the build issues associated with this PR?

cwarnermm avatar Oct 03 '22 14:10 cwarnermm

@neallred - Are you open to helping resolve the code-level issues that are preventing this API docs PR from being merged into production?

cwarnermm avatar Oct 05 '22 20:10 cwarnermm

/update-branch

neallred avatar Oct 07 '22 14:10 neallred

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).

no-eof

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) no-eof

neallred avatar Oct 07 '22 14:10 neallred