From 6ec0e162439ad4603171e148deaea8bd1e3f55e2 Mon Sep 17 00:00:00 2001 From: Artyum Date: Sat, 17 Dec 2022 20:55:46 +0400 Subject: [PATCH] Added request-dto-mapper-bundle recipe (#1438) --- .../packages/artyum_request_dto_mapper.yaml | 29 +++++++++++++++++++ .../1.0/manifest.json | 8 +++++ 2 files changed, 37 insertions(+) create mode 100644 artyuum/request-dto-mapper-bundle/1.0/config/packages/artyum_request_dto_mapper.yaml create mode 100644 artyuum/request-dto-mapper-bundle/1.0/manifest.json diff --git a/artyuum/request-dto-mapper-bundle/1.0/config/packages/artyum_request_dto_mapper.yaml b/artyuum/request-dto-mapper-bundle/1.0/config/packages/artyum_request_dto_mapper.yaml new file mode 100644 index 00000000..976c6d57 --- /dev/null +++ b/artyuum/request-dto-mapper-bundle/1.0/config/packages/artyum_request_dto_mapper.yaml @@ -0,0 +1,29 @@ +# Read the documentation at https://github.com/artyuum/request-dto-mapper-bundle +artyum_request_dto_mapper: + + # Used if the attribute does not specify any (must be a FQCN implementing "\Artyum\RequestDtoMapperBundle\Extractor\ExtractorInterface"). + default_extractor: null # Example: Artyum\RequestDtoMapperBundle\Extractor\JsonExtractor + + # The configuration related to the denormalizer (https://symfony.com/doc/current/components/serializer.html). + denormalizer: + + # Used when mapping the request data to the DTO if the attribute does not set any. + default_options: [] + + # Used when mapping the request data to the DTO (merged with the values passed by the attribute or "default_options"). + additional_options: [] + + # The configuration related to the validator (https://symfony.com/doc/current/validation.html). + validation: + + # Whether to validate the DTO after mapping it. + enabled: false + + # Used when validating the DTO if the attribute does not set any. + default_groups: [] + + # Used when validating the DTO (merged with the values passed by the attribute or "default_groups"). + additional_groups: [] + + # Whether to throw an exception if the DTO validation failed (constraint violations). + throw_on_violation: true diff --git a/artyuum/request-dto-mapper-bundle/1.0/manifest.json b/artyuum/request-dto-mapper-bundle/1.0/manifest.json new file mode 100644 index 00000000..20032a5e --- /dev/null +++ b/artyuum/request-dto-mapper-bundle/1.0/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "Artyum\\RequestDtoMapperBundle\\ArtyumRequestDtoMapperBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +}