You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of title/description/version should not be empty.
If there are empty, we got the following exception:
```
Type error: Argument 8 passed to ApiPlatform\Core\Bridge\Symfony\Bundle\Action\SwaggerUiAction::__construct() must be of the type string, null given, called in /var/www/server/backend/var/cache/dev/appDevDebugProjectContainer.php on line 1155
```
How to reproduce:
```
#config.yml
api_platform:
title: #nothing explicitly
```
Copy file name to clipboardExpand all lines: src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -42,9 +42,21 @@ public function getConfigTreeBuilder()
42
42
43
43
$rootNode
44
44
->children()
45
-
->scalarNode('title')->defaultValue('')->info('The title of the API.')->end()
46
-
->scalarNode('description')->defaultValue('')->info('The description of the API.')->end()
47
-
->scalarNode('version')->defaultValue('0.0.0')->info('The version of the API.')->end()
45
+
->scalarNode('title')
46
+
->info('The title of the API.')
47
+
->cannotBeEmpty()
48
+
->defaultValue('')
49
+
->end()
50
+
->scalarNode('description')
51
+
->info('The description of the API.')
52
+
->cannotBeEmpty()
53
+
->defaultValue('')
54
+
->end()
55
+
->scalarNode('vesion')
56
+
->info('The version of the API.')
57
+
->cannotBeEmpty()
58
+
->defaultValue('')
59
+
->end()
48
60
->scalarNode('default_operation_path_resolver')
49
61
->beforeNormalization()->always(function ($v) {
50
62
@trigger_error('The use of the `default_operation_path_resolver` has been deprecated in 2.1 and will be removed in 3.0. Use `path_segment_name_generator` instead.', E_USER_DEPRECATED);
0 commit comments