Avoid use of any/interface{}

Đang mở
#340 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@jmcarp đang làm issue này rồi.

Từ ngày 19/11/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Enhancement Go SDK
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

Ngôn ngữ chính
Go
Star
26
Fork
6
Merge trung bình
17 giờ 27 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oxidecomputer/oxide.go

Tất cả issue của oxidecomputer/oxide.go

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.