-
-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix openapi normalization #4325
Merged
alanpoulain
merged 3 commits into
api-platform:2.6
from
wearewondrous:fix-openapi-normalization
Jun 25, 2021
Merged
Fix openapi normalization #4325
alanpoulain
merged 3 commits into
api-platform:2.6
from
wearewondrous:fix-openapi-normalization
Jun 25, 2021
Conversation
This file contains 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
relates to #4319 |
tassilogroeper
force-pushed
the
fix-openapi-normalization
branch
from
June 15, 2021 15:22
011e06d
to
b630e14
Compare
dunglas
requested changes
Jun 15, 2021
tassilogroeper
force-pushed
the
fix-openapi-normalization
branch
from
June 16, 2021 06:22
9bb64db
to
9b54731
Compare
alanpoulain
reviewed
Jun 23, 2021
alanpoulain
approved these changes
Jun 23, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, could you rebase?
tassilogroeper
force-pushed
the
fix-openapi-normalization
branch
from
June 25, 2021 07:23
9b54731
to
46b6351
Compare
@alanpoulain done |
Thank you @pheadeaux. |
@dunglas @pheadeaux can someone publish this tag? is not yet available :( i manually install 2.6 branch |
vincentchalamon
pushed a commit
to vincentchalamon/core
that referenced
this pull request
Oct 15, 2021
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.
As described in issue #4318 the function recursiveClean does nest one more time and fails, if an ApiResource has a property named
paths
. Updated tests to reproduce the failing parts.This is version 2, a more general approach, since the logic inside
\ApiPlatform\Core\OpenApi\Serializer\OpenApiNormalizer::recursiveClean
was doing two things:extensionProperties
keys in a recursion andschemas
andpaths
properties of the OpenApi objectSo why not do the sorting in the Object generation directly and fix the double nested
paths
issue with the normalizing call itself.Idea is taken from: Using Callbacks to Serialize Properties with Object Instances