Skip to content

Commit 027d726

Browse files
### 0.2.1 - Add option to override import class in Client class import call
1 parent c243079 commit 027d726

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,7 @@
5656
### 0.2.0
5757
- Split code into traits and helper classes
5858
- Ability to apply filtering functions on api names, description etc. while generating JSON and Docs
59+
60+
### 0.2.1
61+
- Add option to override import class in Client class import call
5962

src/support/forge/api/Traits/Client/Importable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trait Importable
1010

1111
use Filterable;
1212
protected $DEFAULT_SOURCE_JSON_PATH = './config/postman.json';
13+
protected $IMPORTER = Import::class;
1314

1415
/**
1516
* @param string $source
@@ -28,7 +29,7 @@ public function importApi($source = '', $destination = '', $options = [])
2829
if (empty($destination)) {
2930
$destination = realpath($this->rootPath . $this->DEFAULT_API_JSON_PATH);
3031
}
31-
return (new Import($source, $this->getAllOptions()))->writeDefinition($destination, $options);
32+
return (new $this->IMPORTER($source, $this->getAllOptions()))->writeDefinition($destination, $options);
3233
}
3334

3435
/**

0 commit comments

Comments
 (0)