[Step2|BE] Update existing snippet raw endpoint
In #217775 (closed) we updated the behavior of the raw
action. Now we can request a raw
request for specific files in a specific revision.
We should update as well the snippet raw
REST endpoints for this. We can pass now a ref
param and also a file name to the request.
If no ref and file name are passed we will return the first blob raw content. This way we will keep backward compatibility.
We need to update the documentation as well to reflect this change.
Edit:
After some work was carried out to implement this change, @fjsanpedro and I decided it would be better to instead add a new REST endpoint to return the raw blob content for a given file_path
and ref
. This way the new route/pattern can more easily be extended in future to support things like blame
, as well as avoid needing to deal with additional params on the existing endpoint.
This would mean we could then officially deprecate the "old" raw endpoint for 14.0, if we so choose.