oxidecomputer / third-party-api-clients

A place for keeping all our generated third party API clients.
https://docs.rs/octorust
MIT License
133 stars 56 forks source link

[github] add default derive for MinimalRepository and WorkflowRun #47

Closed chantra closed 1 year ago

chantra commented 1 year ago

When instanciating those in test, the number of fields that needs to be declared is overwhelming. When dealing with test cases, in many cases, only a few fields really matter and having something to populate defaults avoid lots of boiler plate.

chantra commented 1 year ago

@augustuswm do you have any opinions on this?

augustuswm commented 1 year ago

Yes, sorry for not following up on this. This makes sense to me. I'll try to get this merged and released early this week.

chantra commented 1 year ago

Thanks for the quick reply. Let me actually update it with another struct I would have otherwise have to wrap. I have yet to look into the mock crate, but I wonder if it would make sense to wrap the generated structures with automock?

augustuswm commented 1 year ago

I'm good with merging these additions. Let me know if you have all of the needed types covered. I'll see if we can have a better way of doing this then listing all of the types.

chantra commented 1 year ago

Yes, I should be good for now. Thanks for checking @augustuswm .