Add wrap parameter to JsonResponse - #55
Merged
Merged
Conversation
DerManoMann
force-pushed
the
feature/json-response-wrap
branch
11 times, most recently
from
June 14, 2026 07:30
c2c420d to
0ca4d59
Compare
Wrapping is a transport concern, not a data shape concern (ADR-004). JsonResponse now wraps resolved content via a late WrapJsonResponseContent processor that runs after MergeJsonContent. Changes: - Add `wrap` parameter to JsonResponse (default 'data') - Add WrapJsonResponseContent processor (after MergeJsonContent) - Remove DataSchema (superseded by wrap) - Remove JsonContentTrait (inlined source into each class) - Remove `type` parameter from JsonResponse and JsonRequestBody - Bump swagger-php minimum to ^6.2.0 (for removeAnnotation) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DerManoMann
force-pushed
the
feature/json-response-wrap
branch
from
June 14, 2026 07:39
0ca4d59 to
0bcf001
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wrapparameter toJsonResponse(Attributes + Annotations), default'data'$refDataSchema— wrapping is a transport concern, not a data shape concern (see ADR-004)$_blacklistfromJsonContentTraitto each consuming classUsage
Breaking changes
DataSchemaremoved — useOA\Schemaon resources, wrapping now lives on the response attributeJsonResponsenow wraps by default — existing bare-ref responses will gain an envelopeTest plan
composer test(PHPUnit + CS Fixer + Rector) green🤖 Generated with Claude Code