Conversation
ComparisonFilter's per-operator OpenAPI parameters inherited the parent object schema and explode=true, so Postman expanded bare gt/lt/... params. Each operator param now carries the inner filter's scalar schema with explode=false. The inner schema is computed with castToArray=false, so UuidFilter and UlidFilter document a single uuid, not oneOf[uuid, array]. Fixes api-platform#8589
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.
ComparisonFilter::getOpenApiParameters()returned the[gt],[gte],[lt],[lte]and[ne]parameters without a schema.OpenApiFactory::mergeParameterthen merged them over a default that carries the object schema fromgetSchema(), withexplode=true. Postman therefore expanded the object into baregt/ltquery params.Each operator param now has the inner filter schema and
explode: false. The inner schema is computed withcastToArray(false), so aUuidFilterorUlidFilterdocuments oneuuidand notoneOf[uuid, array], whichapplyOperatorwould reject. ORM and ODM get the same change.getSchema()does not change.Tests:
ComparisonFilterTest::testOpenApiOperatorParametersAreScalarchecks{type: string}andexplode: false.UuidComparisonFilterTest::testOpenApiOperatorParametersUseScalarUuidSchemachecks{type: string, format: uuid}.On the merge-up to 5.0, add the same two arguments to the
[between]parameter.