-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(examples): Added DeepObject parameter handling to generate appropriate examples #64
Conversation
Issued by Coverage Checker: Coverage ❌ Your code coverage has been degraded 😭
∆ -0.150 🟢
🔴
|
@@ -22,7 +22,7 @@ public function getStatusCode(): ?string | |||
return $this->statusCode; | |||
} | |||
|
|||
public function setStatusCode(string|TaggedValue|null $statusCode): void | |||
public function setStatusCode(string|TaggedValue|int|null $statusCode): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when the config only mentions a return code, it's treated as an int, not a TaggedValue
src/Util/Path.php
Outdated
public static function getFullPath(string $path): string | ||
{ | ||
$dir = \dirname(__DIR__); | ||
|
||
while (!in_array('vendor', \scandir($dir), true)) { | ||
if ($dir === \dirname($dir)) { | ||
return $dir . '/' . trim($path, '/'); | ||
} | ||
$dir = \dirname($dir); | ||
} | ||
|
||
return $dir . '/' . trim($path, '/'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Yaml::parseFile() was breaking as the path needs to be absolute
@@ -46,7 +46,7 @@ suites: | |||
names: [ 'RangeConfig' ] | |||
unit: items | |||
- name: examples | |||
extensionPath: tests/Fixtures/Examples/oc | |||
extensionPath: 'tests/Fixtures/Examples/petstore/examples.new.yml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using an existing file so the PlanTest.testOC() can work (the code related to the extension expects an 'operation' key and this file has one)
b23d66a
to
62772da
Compare
The new filters format (using deepObject) needs to be supported by APITester to generate appropriate examples.