oxidecomputer / oxidecomputer/oxide.go

Avoid use of any/interface{}

Open
#340 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.