Skip to content

Commit aada5ca

Browse files
author
Benedikt Dahm
committed
Swagger: Output swagger description when api.php (__FILE__) is requested and no path requested entitiy is given
1 parent 71116bc commit aada5ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2628,7 +2628,8 @@ public function executeCommand() {
26282628
if ($this->settings['origin']) {
26292629
$this->allowOrigin($this->settings['origin'],$this->settings['allow_origin']);
26302630
}
2631-
if (!$this->settings['request']) {
2631+
$currentScriptFilename = basename(__FILE__);
2632+
if (!$this->settings['request'] || $this->settings['request'] == $currentScriptFilename) {
26322633
$this->swagger($this->settings);
26332634
} else {
26342635
$parameters = $this->getParameters($this->settings);

0 commit comments

Comments
 (0)