Skip to content

fix: Secure Files API secure_file_id should be required param

What does this MR do and why?

fix: Secure Files API secure_file_id should be required param

Previously, require referenced ambiguous route param :id which references the project ID instead. The validation around requires :id would fail when a string-path was provided, leading to :id is invalid

References

How to set up and validate locally

See patch for testing previous failure, demo:

Before

❯ curl -H 'PRIVATE-TOKEN: $GL_TOKEN' http://gdk.test:3000/api/v4/projects/flipflop%2Fverify-520569/secure_files/1
{"error":"id is invalid"}%

After

❯ curl -H 'PRIVATE-TOKEN: $GL_TOKEN' http://gdk.test:3000/api/v4/projects/flipflop%2Fverify-520569/secure_files/1
{"id":1,"name":"old_query.sql","checksum":"eadccb26759413b0839d5280cba1f9bf97aa1bfebe3870dcb79581488262ec70","checksum_algorithm":"sha256","created_at":"2025-04-29T21:38:34.472Z","expires_at":null,"metadata":null,"file_extension":"sql"}%

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lucas Charles

Merge request reports

Loading