mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Merge pull request #46 from willdurand/no-sandbox-cmd
Add new option to the command line: --no-sandbox
This commit is contained in:
commit
8f3327b376
@ -32,6 +32,7 @@ class DumpCommand extends ContainerAwareCommand
|
|||||||
'Output format like: ' . implode(', ', $this->availableFormats),
|
'Output format like: ' . implode(', ', $this->availableFormats),
|
||||||
$this->availableFormats[0]
|
$this->availableFormats[0]
|
||||||
)
|
)
|
||||||
|
->addOption('no-sandbox', '', InputOption::VALUE_NONE)
|
||||||
->setName('api:doc:dump')
|
->setName('api:doc:dump')
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -51,6 +52,10 @@ class DumpCommand extends ContainerAwareCommand
|
|||||||
$formatter = $this->getContainer()->get(sprintf('nelmio_api_doc.formatter.%s_formatter', $format));
|
$formatter = $this->getContainer()->get(sprintf('nelmio_api_doc.formatter.%s_formatter', $format));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($input->hasOption('no-sandbox') && 'html' === $format) {
|
||||||
|
$formatter->setEnableSandbox(false);
|
||||||
|
}
|
||||||
|
|
||||||
$extractedDoc = $this->getContainer()->get('nelmio_api_doc.extractor.api_doc_extractor')->all();
|
$extractedDoc = $this->getContainer()->get('nelmio_api_doc.extractor.api_doc_extractor')->all();
|
||||||
$formattedDoc = $formatter->format($extractedDoc);
|
$formattedDoc = $formatter->format($extractedDoc);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user