Closed grafjo closed 6 months ago
Hello @grafjo, thank you for pointing this issue.
from_date
and to_date
are legacy fields that should not be used anymore, they have been replaced by from_datetime
and to_datetime
respectively. They are still exposed in the API for compatibility reason, to prevent breaking existing implementation, but are undocumented to discourage usage in new implementation.
That said, it's indeed an issue if these fields cause errors in the Java SDK. It seems related to a configuration issue of the openapi java sdk generator we are using. We will update the configuration to make sure the client does not fail when an unknown attribute is received in an API response.
Hi @vincent-pochet,
thanks for your answer. I opened a new bug in the lago-java-client https://github.com/getlago/lago-java-client/issues/8
I'm not sure if this issue here has to be open or closed.
Thank you @grafjo.
Since you open the issue on the java SDK side, I'm closing this one.
Describe the bug
Calling the current usage of a given customer via the http api contains undocumented attributes like
from_date
/to_date
. Even https://swagger.getlago.com/#/customers/findCustomerCurrentUsage dosn't mention them nor https://docs.getlago.com/api-reference/customer-usage/get-currentThis leads to invalid generated clients based on openapi definition like java client (https://github.com/getlago/lago-java-client/pull/7).
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect that the openapi-definiton contains only attributes that are returned by the api or that clients are generated in a way that they will ignore unknown attributes.
Version