NelmioApiDocBundle icon indicating copy to clipboard operation
NelmioApiDocBundle copied to clipboard

The option "documentation" does not exist

Open pmoscicki opened this issue 4 years ago • 6 comments

"nelmio/api-doc-bundle": "^3.7"

form type created like docs https://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html#symfony-form-types

but got error in unit test

Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException: The option "documentation" does not exist. Defined options are: "action", "allow_extra_fields", "allow_file_upload", "attr", "attr_translation_parameters", "auto_initialize", "block_name", "block_prefix", "by_reference", "compound", "constraints", "data", "data_class", "disabled", "empty_data", "error_bubbling", "error_mapping", "extra_fields_message", "help", "help_attr", "help_html", "help_translation_parameters", "inherit_data", "invalid_message", "invalid_message_parameters", "is_empty_callback", "label", "label_attr", "label_format", "label_html", "label_translation_parameters", "mapped", "method", "post_max_size_message", "property_path", "required", "row_attr", "translation_domain", "trim", "upload_max_size_message", "validation_groups".

also I found this: https://github.com/nelmio/NelmioApiDocBundle/issues/1127#issuecomment-371598324

pmoscicki avatar Sep 11 '20 11:09 pmoscicki

Autowiring working

php bin/console debug:container | grep -i documentation

  nelmio_api_doc.controller.swagger                                                                Nelmio\ApiDocBundle\Controller\DocumentationController                                          
  nelmio_api_doc.form.documentation_extension                                                      Nelmio\ApiDocBundle\Form\Extension\DocumentationExtension                                       

pmoscicki avatar Sep 11 '20 14:09 pmoscicki

Any news regarding this topic?

nuil avatar Mar 16 '22 15:03 nuil

Any news regarding this topic?

you should set 'all' environment in config/bundles.php

<?php

return [
    Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
];
?>

kulavvy avatar Mar 16 '22 15:03 kulavvy

It is already: image

nuil avatar Mar 16 '22 15:03 nuil

Any news regarding this topic?

Tsekhovskoy avatar Jul 27 '23 13:07 Tsekhovskoy

Hi! I would like to know - perhaps there are ways to solve this problem? The problem is still relevant

Tsekhovskoy avatar Oct 19 '23 14:10 Tsekhovskoy