Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1233

Client Java SDK operations with LocalDate (and other date types) in Request shouldn't also require a dateFormat and locale in the request

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • None
    • None
    • SDK

    Description

      Requests such as POST /offices have e.g. an openingDate which is of Java type LocalDate.

      Due to https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm#dates_and_numbers, a user of the Java Client has to also specify a dateFormat("yyyy-mm-dd") AND a locale("en_US"). From a Java API point of view, this doesn't really make much sense. (Because if it's a strong type, the implementation should serialize it however it sees fit; asking the user to specify the Date Format, but have the implementation provide the Serialization, mixes up layers of responsibility.)

      I'm not sure how to best address this. For the short term, I'll at least introduce a DATE_FORMAT = "yyyy-mm-dd" constant in FineractClient which can be used.

      PS: Date types are not consistent in the client, see FINERACT-1232.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vorburger Michael Vorburger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: