[
https://issues.apache.org/jira/browse/FINERACT-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515125#comment-17515125
]
Aleksandar Vidakovic commented on FINERACT-1230:
------------------------------------------------
This specific issue is solved. We might have more such cases later, but we can
solve them when they happen. The solution is very easy: if you have a resource
class "XyzApiResource" then usually you'll find a corresponding "XyzApiSwagger"
class that contains the type information we unfortunately don't have in the
JAX-RS resource classes, because we store the JSON request body in a string
variable. In the Swagger class just change the type of the parameters as you
need. There are no consequences for that on the real implementation code and
for the JSON parser Integer/Long doesn't matter.
In general we should set the type of all variables that contain any IDs to Long.
> SDK Swagger Client Java API mixes Long and Integer for IDs
> ----------------------------------------------------------
>
> Key: FINERACT-1230
> URL: https://issues.apache.org/jira/browse/FINERACT-1230
> Project: Apache Fineract
> Issue Type: Bug
> Components: SDK
> Reporter: Michael Vorburger
> Priority: Major
>
> It seems to me that the code generated from our OpenAPI Swagger metadata
> mixes up Long and Integer for IDs somewhere.
> For example, if in
> org.apache.fineract.client.services.DocumentsApi.getDocument(String, Long,
> Long) the entity ID is Long, why does GetClientsResponse have an Integer
> getId()...
> We IMHO should just use Long everywhere for everything, in the API (even if
> in the implementation it's still Integer).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)