Skip to content

Avoid use of any/interface{} #340

@jmcarp

Description

@jmcarp

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions