-
Notifications
You must be signed in to change notification settings - Fork 126
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
do not type hint mixed parameter types for request bodies in endpoint constructor and clients operations method #158
do not type hint mixed parameter types for request bodies in endpoint constructor and clients operations method #158
Conversation
Could you add a related fixture in tests please ? |
@Korbeil I am not familiar with the test cases for this lib and had just a quick check. The approach seems pretty straight forward, but I am not sure if I should extend an existing test case or create a new one. Which one do you prefer? |
Pull Request Test Coverage Report for Build 577
💛 - Coveralls |
You just have to go to src/OpenApi/Tests/fixtures then add a directory with the name you want and add a schema matching your case with expected generated Client |
@Korbeil ok, will add a new test fixture, thx. |
I don't see a Normalizer for your FooBar object, isn't that a problem ? We should have a Normalizer and a Model class here I think 🤔 |
@Korbeil I agree. For our usage at the moment it is not a problem as it reuses the same model in another endpoint so for that context it seems to be fine, but I agree that the root of the problem may be the correct handling of the |
Okok, let's forget that for this PR so. |
… constructor and clients operations method
708ad5c
to
6e66835
Compare
yes, rebased and fixed |
Thanks for your contribution 😄 |
see #157
Resolved parameter types for response bodies of type
mixed
are used as type hints in endpoint constructor and related client operation method signatures.This PR fixes this by using the default parameter type
null
for these cases.