Repository navigation
Conversation
With methodArguments: require-security-and-request, operations whose only
parameter is the hidden SHIPPO-API-VERSION global (service_groups.list,
refunds.list, user_parcel_templates.list, get/delete_default_parcel_template)
generate an empty but required request model, so callers must pass request={}.
infer-optional-args (already used by the C# SDK) gives such requests a default.
It only adds defaults; existing calls keep working.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python.methodArgumentsin.speakeasy/gen.yamlfromrequire-security-and-requesttoinfer-optional-args(the setting the C# SDK already uses).request={}becomes a note that it's optional from 5.0.0b3.Why
In 5.0.0b1/b2, methods whose only parameter is the hidden
SHIPPO-API-VERSIONglobal get an empty but required request model, so these fail withoutrequest={}:service_groups.list,refunds.list,user_parcel_templates.list,rates_at_checkout.get_default_parcel_template,rates_at_checkout.delete_default_parcel_template. MIGRATION.md promised to fix this before 5.0.0.Effect (verified with a local
speakeasy generatefrom this config)Only 8 methods change (sync + async), and each change just adds a default, e.g.:
Affected: the 5 above plus
carrier_accounts.list,orders.list,shipments.list,transactions.list(which only have optional filters). No other signature changes; passingrequest=...keeps working, so this is backwards compatible.Testing (local regen against the test account)
service_groups.list(),refunds.list(),carrier_accounts.list(),shipments.list(),orders.list(),transactions.list(),rates_at_checkout.get_default_parcel_template();service_groups.list(request={})still works.user_parcel_templates.list()fails response validation because the API returnsobject_createdas2024-03-20 15:42:59.798846 +0000 UTC(not ISO 8601). 3.9.0 fails on the same response, so it is not a regression; it needs an API-side fix.After merge
Not a publish trigger (no RELEASES.md change). The next Generate regenerates with this config as
5.0.0-beta.3.🤖 Generated with Claude Code