Preserve empty JSON schema object maps#234
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #234 +/- ##
============================================
+ Coverage 88.12% 88.22% +0.09%
- Complexity 1213 1226 +13
============================================
Files 60 61 +1
Lines 3934 3967 +33
============================================
+ Hits 3467 3500 +33
Misses 467 467
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
felixarntz
left a comment
There was a problem hiding this comment.
@chubes4 Thank you for the PR! Mostly looks good, a few minor things to address.
|
Thank you! Will fix everything noted. |
|
Thanks for the review, @felixarntz. I addressed the feedback in db2e83e: |
Summary
FunctionDeclarationthat preserves empty JSON Schema object-map fields as{}.FunctionDeclaration::jsonSerialize()to use the safe parameter representation.Fixes #233.
Testing
vendor/bin/phpunit tests/unit/Tools/DTO/FunctionDeclarationTest.php --filter testJsonSerializationPreservesEmptySchemaObjectMapsvendor/bin/phpunit tests/unit/Providers/OpenAiCompatibleImplementation/AbstractOpenAiCompatibleTextGenerationModelTest.php --filter testPrepareToolsParamPreservesEmptySchemaObjectMapsvendor/bin/phpunit tests/unit/Tools/DTO/FunctionDeclarationTest.phpvendor/bin/phpunit tests/unit/Providers/OpenAiCompatibleImplementation/AbstractOpenAiCompatibleTextGenerationModelTest.phpcomposer phpcscomposer phpstanAI assistance