Skip to content

Fix nested resource 404 generation - #91

Merged
sidux merged 2 commits into
mainfrom
fix/deterministic-nested-404
Aug 14, 2026
Merged

Fix nested resource 404 generation#91
sidux merged 2 commits into
mainfrom
fix/deterministic-nested-404

Conversation

@sidux

@sidux sidux commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary:

  • replace every eligible path resource ID with a stable missing value
  • keep enum and unsupported path values unchanged
  • cover nested parent and child resources

This fixes the generated 404 case failing in OpenClassrooms/SdZv4#21074 when only the parent lookup returns 404.

Tests:

  • composer check

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Issued by Coverage Checker:

Coverage

✅ Your code coverage has not been degraded 🎉

Measure Main branch refs/pull/91/merge
Coverage 59.307% 59.363%
Total lines 3551 3546
Covered lines 2106 2105

∆ 0.056

🟢 ↗️ Improved files:

File On main branch refs/pull/91/merge
APITester/APITester/src/Test/Preparator/Error404Preparator.php 160 / 179 (89.385%) 159 / 174 (91.379%)

@sidux
sidux requested review from Dzov and a balanced review from Copilot August 13, 2026 16:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates 404 test generation so nested-resource paths invalidate every eligible resource identifier.

Changes:

  • Replaces all eligible path parameters with stable schema-valid values.
  • Preserves enum and unsupported parameters.
  • Expands tests and documentation for nested paths and integer boundaries.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Test/Preparator/Error404Preparator.php Generates and applies all safe path replacements.
tests/Preparator/Error404PreparatorTest.php Covers nested resources and integer edge cases.
docs/preparators-config.md Documents the new replacement behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sidux
sidux merged commit 7099c3d into main Aug 14, 2026
5 checks passed
@sidux
sidux deleted the fix/deterministic-nested-404 branch August 14, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants