diff --git a/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/TaxonDocumentationModifier.php b/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/TaxonDocumentationModifier.php new file mode 100644 index 0000000000..89060005f5 --- /dev/null +++ b/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/TaxonDocumentationModifier.php @@ -0,0 +1,49 @@ +apiRoute); + + $paths = $docs->getPaths(); + $pathItem = $paths->getPath($path); + $operation = $pathItem?->getGet(); + if (null === $operation) { + return $docs; + } + + $operation = $operation + ->withSummary('Retrieves the collection of enabled Taxon resources for the current channel.') + ->withDescription( + 'Returns the direct enabled children of the Menu Taxon configured for the current channel. ' . + "The Menu Taxon is resolved from the active channel configuration. " . + "If no Menu Taxon is configured for the channel, the default code is used.", + ) + ; + + $pathItem = $pathItem->withGet($operation); + $paths->addPath($path, $pathItem); + + return $docs->withPaths($paths); + } +} diff --git a/src/Sylius/Bundle/ApiBundle/Resources/config/integrations/swagger.xml b/src/Sylius/Bundle/ApiBundle/Resources/config/integrations/swagger.xml index 83441409a3..6db0d014cc 100644 --- a/src/Sylius/Bundle/ApiBundle/Resources/config/integrations/swagger.xml +++ b/src/Sylius/Bundle/ApiBundle/Resources/config/integrations/swagger.xml @@ -106,5 +106,10 @@ + + + %sylius.security.api_route% + +