While creating clients for chroma in Java and Go I've wanted to be able to generate java/go specific clients from the openapi.json of chroma sever API. However as it was taken from pyhon implementation, it relies on generics (e.g. { } as return object) which JS and Python are all to happy to play along with. However static languages like java/go etc. do not like this type of generics and generated clients need a lot of adjustments.
Describe the proposed solution
I have created a "good enough" spec based on 0.4.4 server which can be used to enhance the FastAPI endpoints (response models mostly) so that generated OpenAPI spec is useful for static langs.
Describe the problem
While creating clients for chroma in Java and Go I've wanted to be able to generate java/go specific clients from the openapi.json of chroma sever API. However as it was taken from pyhon implementation, it relies on generics (e.g.
{ }
as return object) which JS and Python are all to happy to play along with. However static languages like java/go etc. do not like this type of generics and generated clients need a lot of adjustments.Describe the proposed solution
I have created a "good enough" spec based on 0.4.4 server which can be used to enhance the FastAPI endpoints (response models mostly) so that generated OpenAPI spec is useful for static langs.
Here is the Gist with the spec - https://gist.github.com/tazarov/c2e0f4952a881cc7a0fb01de982e8556
Alternatives considered
Update the generated clients by hand - too consuming and when, inevitably, changes to the API are made it is a lot more difficult to update clients.
Importance
would make my life easier
Additional Information
No response