oxidecomputer / oxidecomputer/oxide.go
Avoid use of any/interface{}
Open
@jmcarp is already working on this.
Since Nov 19, 2025.
Enhancement
Go SDK
- Dominant language
- Go
- Stars
- 26
- Forks
- 6
- Avg merge
- 5h 33m
- Merged PRs (30d)
- 9
Description
Overview
Most fields in the sdk are represented using concrete types, either primitives or structs derived from the openapi spec. However, we occasionally fall back to any or interface{} types. This happens when we haven't handled an edge case in the spec, or when we represent a complex oneOf type based on a rust enum. I think this task has a few parts:
- Fix edge cases in the generator so that we don't fall back to any for unknown types.
- Decide how to represent oneOf types in a relatively ergonomic way.
- Update the generator so that returning an any/interface{} is an error.
Implementation details
No response
Anything else you would like to add?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.