@@ -27,20 +27,21 @@ final class SwaggerCommand extends Command
27
27
{
28
28
private $ documentationNormalizer ;
29
29
private $ resourceNameCollectionFactory ;
30
- private $ title ;
31
- private $ description ;
32
- private $ version ;
33
- private $ formats ;
30
+ private $ apiTitle ;
31
+ private $ apiDescription ;
32
+ private $ apiVersion ;
33
+ private $ apiFormats ;
34
34
35
- public function __construct (DocumentationNormalizer $ documentationNormalizer , ResourceNameCollectionFactoryInterface $ resourceNameCollection , string $ title , string $ description , string $ version , array $ formats )
35
+ public function __construct (DocumentationNormalizer $ documentationNormalizer , ResourceNameCollectionFactoryInterface $ resourceNameCollection , string $ apiTitle , string $ apiDescription , string $ apiVersion , array $ apiFormats )
36
36
{
37
37
parent ::__construct ();
38
+
38
39
$ this ->documentationNormalizer = $ documentationNormalizer ;
39
40
$ this ->resourceNameCollectionFactory = $ resourceNameCollection ;
40
- $ this ->title = $ title ;
41
- $ this ->description = $ description ;
42
- $ this ->version = $ version ;
43
- $ this ->formats = $ formats ;
41
+ $ this ->apiTitle = $ apiTitle ;
42
+ $ this ->apiDescription = $ apiDescription ;
43
+ $ this ->apiVersion = $ apiVersion ;
44
+ $ this ->apiFormats = $ apiFormats ;
44
45
}
45
46
46
47
/**
@@ -58,7 +59,7 @@ protected function configure()
58
59
*/
59
60
protected function execute (InputInterface $ input , OutputInterface $ output )
60
61
{
61
- $ documentation = new Documentation ($ this ->resourceNameCollectionFactory ->create (), $ this ->title , $ this ->description , $ this ->version , $ this ->formats );
62
+ $ documentation = new Documentation ($ this ->resourceNameCollectionFactory ->create (), $ this ->apiTitle , $ this ->apiDescription , $ this ->apiVersion , $ this ->apiFormats );
62
63
$ data = $ this ->documentationNormalizer ->normalize ($ documentation );
63
64
$ content = json_encode ($ data , JSON_PRETTY_PRINT );
64
65
$ output ->writeln ($ content );
0 commit comments