Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/tutorials/migrating-apis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ old_param.rename("data")
# process_data(input="test") -> process_data(data="test")
```

<Info>See [dependencies and usages](/building-with-codegen/dependencies-and-usages) for more on updating parameter names and types.</Info>

### Adding Required Parameters

When adding a new required parameter to an API:
Expand All @@ -41,6 +43,8 @@ for call in call_sites:
call.add_argument("timeout=30") # Add with a default value
```

<Info>See [function calls and callsites](/building-with-codegen/function-calls-and-callsites) for more on handling call sites.</Info>

### Changing Parameter Types

When updating parameter types:
Expand All @@ -58,6 +62,8 @@ for call in api_function.call_sites:
arg.edit(f"UUID({arg.value})")
```

<Info>See [working with type annotations](/building-with-codegen/type-annotations) for more on changing parameter types.</Info>

### Deprecating Functions

When deprecating an old API in favor of a new one:
Expand Down