[Step2|BE] Update Snippet Entity to return multiple files
Important: All the new functionality must be implemented behind the feature flag
:snippet_multiple_files. Besides, it has to be scoped for users. Therefore, instead of checking if the feature flag is enabled or not (
Feature.enabled?(:snippet_multiple_files)), we will check if the feature flag is enabled for specific users (
When the new feature flag is enabled we need to make some changes to the snippet Grape entity.
When the feature flag is enabled, we will add new argument to the
Snippet entity called
files. This argument will return all the snippet files inside the snippet.
Besides, we will remove as well the fields
raw_url from the
For each file within the Snippet repository, this new field will return:
:snippet_multiple_files feature flag is removed, we will look to remove
file_name and potentially
raw_url, but at the moment we are keeping them to maintain backwards compatibility.