Closed rabbiveesh closed 2 years ago
Can you rebase in main so we get automatic testing?
Yes, will account for all the comments, thanks!
Wrt new on an object: after I did the change, I realized that new on an object wouldn't really make sense. Should it die, or should it just crash when it naturally would?
On Wed, Jun 1, 2022, 04:38 Jan Henning Thorsen @.***> wrote:
@.**** commented on this pull request.
In t/client.t https://github.com/jhthorsen/openapi-client/pull/37#discussion_r886251435 :
isa_ok($client, 'OpenAPI::Client'); can_ok($client, 'addPet');
+subtest 'pre-mixing roles' => sub {
Can you also update https://github.com/jhthorsen/openapi-client/blob/main/.github/workflows/ci-ubuntu.yml#L25 to install Role::Tiny?
— Reply to this email directly, view it on GitHub https://github.com/jhthorsen/openapi-client/pull/37#discussion_r886251435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFURPKWQ4D5SI7M7XXE3WX3VM25IJANCNFSM5XOSGJPA . You are receiving this because you were assigned.Message ID: @.***>
This is an implementation of what I meant for #35. Again, the issue I was having is that I wanted to mix in a role which had defaults for attributes and other things that would normally happen at BUILD time. Since I could only mix the behavior in after instantiation, I had to manually pass through some of the behavior that I wanted to.
This PR simply replaces the fixed $BASE that OpenAPI::Client uses to be the parent for generated class to instead be the dynamic one that's called.