mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 07:41:43 +03:00
Add new option to the command line: --no-sandbox
This commit is contained in:
parent
bee518f92e
commit
374ee9a878
@ -32,6 +32,7 @@ class DumpCommand extends ContainerAwareCommand
|
||||
'Output format like: ' . implode(', ', $this->availableFormats),
|
||||
$this->availableFormats[0]
|
||||
)
|
||||
->addOption('no-sandbox', '', InputOption::VALUE_NONE)
|
||||
->setName('api:doc:dump')
|
||||
;
|
||||
}
|
||||
@ -51,6 +52,10 @@ class DumpCommand extends ContainerAwareCommand
|
||||
$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();
|
||||
$formattedDoc = $formatter->format($extractedDoc);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user