-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested structs in type_gen should not be anonymous structs #154
Comments
We use openapi code generator to generates these types from an API spec. Unfortunately, we are restricted by that. |
Fortunately, you are not restricted as this is an option in oapi-codegen, which you use. You must update the schema to add I need to stress here that currently, the client is incredibly cumbersome to use without this change and will make adoption very difficult. I'm not sure what the authoritative source for the openapi spec is though. |
Up! Please, it would be a welcome implementation. Go as you know is a stong typed language, having anonymous nested structs greatly lowers the dev experience. |
The api spec is maintained here: https://github.com/typesense/typesense-api-spec/blob/master/openapi.yml Happy to accept a PR for this change. |
see:
typesense-go/typesense/api/types_gen.go
Line 153 in 4d2cad0
Nested structs should not be anonymous structs, as this makes it so the caller needs to define the struct manually in order to pass it in as an argument to the function.
The text was updated successfully, but these errors were encountered: