Giter VIP home page Giter VIP logo

Comments (2)

robotdan avatar robotdan commented on July 24, 2024

Thanks for letting us know @JonasDoe .

In Java that field is a java.time.LocalDate, and we serialize it to yyyy-MM-dd. So in the Go client, we could either just use a String or provide some custom serialization / de-serialization.

You may have already figured out how all of this comes together, but if not.

JSON definition of the FusionAuth User object, this gets built from our Java domain.
https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/domain/io.fusionauth.domain.User.json

Here is the macro file that maps the Java types into language specific values:
https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/_macros.ftl

And the Go Domain template which uses the macro file above.
https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/go.domain.ftl

@matthew-altman It looks like LocalDate and ZonedDateTime are being set as int64 in Go. For the LocalDate - at least for the birthDate in the User object we'll need to serialize this to a yyy-MM-dd String. We can either just switch this to a string, or add some serialization and de-serialization code.

Can you take a look and see if there are other uses of LocaleDate that may also have this issue, I think this is the only one on the API, but let's double check.

from go-client.

matthew-altman avatar matthew-altman commented on July 24, 2024

The only LocalDate in the domain is the User BirthDate field. Some of our other clients, such as CSharp and JS, covert LocalDate to a String. So for consistency we should probably just do the same for Go.

from go-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.