diff --git a/features/openapi/docs.feature b/features/openapi/docs.feature index 1aa379c71b8..6bc34619f4b 100644 --- a/features/openapi/docs.feature +++ b/features/openapi/docs.feature @@ -396,38 +396,27 @@ Feature: Documentation support Then the response status code should be 200 And the response should be in JSON And the JSON node "openapi" should be equal to "3.0.0" - And the JSON node "components.schemas.DummyBoolean" should be equal to: + And the JSON node "components.schemas.DummyBoolean.properties.id.anyOf" should be equal to: """ - { - "type": "object", - "description": "", - "deprecated": false, - "properties": { - "id": { - "readOnly": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "isDummyBoolean": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "dummyBoolean": { - "readOnly": true, - "type": "boolean" - } + [ + { + "type": "integer" + }, + { + "type": "null" } - } + ] + """ + And the JSON node "components.schemas.DummyBoolean.properties.isDummyBoolean.anyOf" should be equal to: """ + [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + """ + And the JSON node "components.schemas.DummyBoolean.properties.isDummyBoolean.owl:maxCardinality" should not exist + diff --git a/src/Symfony/Bundle/Resources/config/graphql.xml b/src/Symfony/Bundle/Resources/config/graphql.xml index a089eebb2bc..932feb68d3c 100644 --- a/src/Symfony/Bundle/Resources/config/graphql.xml +++ b/src/Symfony/Bundle/Resources/config/graphql.xml @@ -213,8 +213,8 @@ <argument type="service" id="api_platform.metadata.resource.metadata_collection_factory" on-invalid="ignore" /> <argument type="service" id="api_platform.security.resource_access_checker" on-invalid="ignore" /> - <!-- Run before serializer.normalizer.json_serializable --> - <tag name="serializer.normalizer" priority="-890" /> + <!-- Run before serializer.normalizer.json_serializable and before serializer.normalizer.backed_enum which is at 880 --> + <tag name="serializer.normalizer" priority="-878" /> </service> <service id="api_platform.graphql.normalizer.object" class="ApiPlatform\GraphQl\Serializer\ObjectNormalizer" public="false">