Skip to content

CONV-303: Add file target formats endpoint#263

Merged
menvil merged 1 commit into
developfrom
feature/CONV-303-add-file-target-formats-endpoint
Jun 3, 2026
Merged

CONV-303: Add file target formats endpoint#263
menvil merged 1 commit into
developfrom
feature/CONV-303-add-file-target-formats-endpoint

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds GET /api/v1/files/{file}/targets returning available target formats for uploaded file
  • Uses ConverterRegistry::targetsFor() via FileController::targets()
  • Ownership enforced: only file owner can see targets; 403 otherwise
  • Unsupported format returns empty list

Test plan

  • PNG file returns targets including 'jpg'
  • Other user's file → 403
  • Missing API key → 401
  • Unknown format → empty list
  • composer test passes (566 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Adds GET /api/v1/files/{file}/targets to list available conversion target formats for a user's uploaded file. Fulfills Linear CONV-303.

  • New Features
    • Endpoint implemented via FileController::targets() using ConverterRegistry::targetsFor().
    • Requires API key (401 if missing); only the file owner can access (403 otherwise).
    • Returns a data array with target_format, label, description, recommended; empty list for unsupported source formats.

Written for commit 4d41c47. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit d833285 into develop Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a98bbaa1-b4b1-41d0-9706-111b4f3b1eab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-303-add-file-target-formats-endpoint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant