You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project we use the openapi-generator 5.0.0-beta2 for generating our kotlin client stubs. The ApiClient offers some constructor parameters but I'm missing an option to add an additional retrofit Converter.Factory. I need this option to specify a factory, which serializes a date object as query parameter string (in our custom format, .toString() is not enough for me). In our project we use GSON as serialization library and I couldn't figure out how it is possible to set such a retrofit converter for query parameters with the currently available options.
For testing purposes I extended the generated ApiClient class with an additional constructor parameter to add our specific Converter.Factory and with this change the query parameter could successfully be serialized.
Is there already a possibility to achieve my requested behaviour with the SerializerBuilder I can pass into the class? Or is there a different approach to achieve this? What is your opinion to my described workaround?
Thank you
openapi-generator version
5.0.0-beta2
Suggest a fix/enhancement
Add an option (constructor param) to add custom retrofit converter factories. This should be optional and not break current clients.
I could create a pull request with a possible change if you wish.
The text was updated successfully, but these errors were encountered:
Description
In our project we use the openapi-generator 5.0.0-beta2 for generating our kotlin client stubs. The ApiClient offers some constructor parameters but I'm missing an option to add an additional retrofit Converter.Factory. I need this option to specify a factory, which serializes a date object as query parameter string (in our custom format, .toString() is not enough for me). In our project we use GSON as serialization library and I couldn't figure out how it is possible to set such a retrofit converter for query parameters with the currently available options.
For testing purposes I extended the generated ApiClient class with an additional constructor parameter to add our specific Converter.Factory and with this change the query parameter could successfully be serialized.
Is there already a possibility to achieve my requested behaviour with the SerializerBuilder I can pass into the class? Or is there a different approach to achieve this? What is your opinion to my described workaround?
Thank you
openapi-generator version
5.0.0-beta2
Suggest a fix/enhancement
Add an option (constructor param) to add custom retrofit converter factories. This should be optional and not break current clients.
I could create a pull request with a possible change if you wish.
The text was updated successfully, but these errors were encountered: