Skip to content

Commit d061c38

Browse files
authored
fix(graphql): increment graphql normalizer priority (#6283)
* fix(graphql): increment graphql normalizer priority closes #6279 #6264 * improve behat test
1 parent b029c38 commit d061c38

File tree

2 files changed

+23
-34
lines changed

2 files changed

+23
-34
lines changed

features/openapi/docs.feature

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -396,38 +396,27 @@ Feature: Documentation support
396396
Then the response status code should be 200
397397
And the response should be in JSON
398398
And the JSON node "openapi" should be equal to "3.0.0"
399-
And the JSON node "components.schemas.DummyBoolean" should be equal to:
399+
And the JSON node "components.schemas.DummyBoolean.properties.id.anyOf" should be equal to:
400400
"""
401-
{
402-
"type": "object",
403-
"description": "",
404-
"deprecated": false,
405-
"properties": {
406-
"id": {
407-
"readOnly": true,
408-
"anyOf": [
409-
{
410-
"type": "integer"
411-
},
412-
{
413-
"type": "null"
414-
}
415-
]
416-
},
417-
"isDummyBoolean": {
418-
"anyOf": [
419-
{
420-
"type": "boolean"
421-
},
422-
{
423-
"type": "null"
424-
}
425-
]
426-
},
427-
"dummyBoolean": {
428-
"readOnly": true,
429-
"type": "boolean"
430-
}
401+
[
402+
{
403+
"type": "integer"
404+
},
405+
{
406+
"type": "null"
431407
}
432-
}
408+
]
409+
"""
410+
And the JSON node "components.schemas.DummyBoolean.properties.isDummyBoolean.anyOf" should be equal to:
433411
"""
412+
[
413+
{
414+
"type": "boolean"
415+
},
416+
{
417+
"type": "null"
418+
}
419+
]
420+
"""
421+
And the JSON node "components.schemas.DummyBoolean.properties.isDummyBoolean.owl:maxCardinality" should not exist
422+

src/Symfony/Bundle/Resources/config/graphql.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@
213213
<argument type="service" id="api_platform.metadata.resource.metadata_collection_factory" on-invalid="ignore" />
214214
<argument type="service" id="api_platform.security.resource_access_checker" on-invalid="ignore" />
215215

216-
<!-- Run before serializer.normalizer.json_serializable -->
217-
<tag name="serializer.normalizer" priority="-890" />
216+
<!-- Run before serializer.normalizer.json_serializable and before serializer.normalizer.backed_enum which is at 880 -->
217+
<tag name="serializer.normalizer" priority="-878" />
218218
</service>
219219

220220
<service id="api_platform.graphql.normalizer.object" class="ApiPlatform\GraphQl\Serializer\ObjectNormalizer" public="false">

0 commit comments

Comments
 (0)