Skip to content

CONV-309: Add API resource response DTOs#269

Merged
menvil merged 1 commit into
developfrom
feature/CONV-309-add-api-resource-response-dtos
Jun 3, 2026
Merged

CONV-309: Add API resource response DTOs#269
menvil merged 1 commit into
developfrom
feature/CONV-309-add-api-resource-response-dtos

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • All controllers already use Laravel Resources (FileResource, ConversionResource, ConverterResource, TargetFormatResource)
  • Adds shape tests verifying internal fields (stored_path, token_hash, options_json) are never exposed
  • Verifies PHP class names don't leak in converter keys

Test plan

  • File resource: no stored_path, no checksum in response
  • Converter resource: no backslashes in key field
  • Conversion resource: no converter_key, options_json, user_id
  • No token_hash in any response
  • composer test passes (588 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Added tests that lock down API v1 resource response DTOs to prevent leaking internal fields and class names. Addresses Linear CONV-309 by verifying file, conversion, converter, and targets endpoints exclude stored_path, checksum, converter_key, options_json, user_id, and token_hash, and that converter key has no backslashes.

Written for commit 0cd8a10. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit 5daa40b into develop Jun 3, 2026
1 check was pending
@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: e230f388-548f-46f5-be58-d7d7da4e9734

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-309-add-api-resource-response-dtos

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