Implementing OpenAPI Spec in Go Client

TLDR Kishore Nallan suggested using the openapi spec for generating classes/structs for the Go client, making it easier for statically typed languages. The spec must be updated for the recent changes.

Powered by Struct AI


May 04, 2021 (33 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:55 PM
For generating the classes / structs for the client, we can use the openapi spec that the Go client is using here: https://github.com/typesense/typesense-go/blob/master/typesense/api/openapi.yml

This way we don't have to generate those classes by hand. Thoughts?


Kishore Nallan
03:56 PM
This is up-to-date till v0.19 -- we need to update it for the changes in 0.20 and we should be ready to go.
Kishore Nallan
03:57 PM
The python / ruby clients don't use specific classes since the languages are not statically typed. But for statically typed languages, this is a much easier and scalable approach.