Comments (7)
Hmmm. Based on my limited understanding of golang, it looks like we'd want to set the type of the User
field in the RegistrationRequest
to *User
so it could be nillable and thus omitted when optionall. I think that would happen here: https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/_macros.ftl#L36 but would need to test it more (because I think we'd need to dereference the pointer elsewhere).
I would imagine this would be an issue for other request structs which have optional objects nested, such as ApplicationRequest
.
from go-client.
Does the workaround mentioned above work for you @Tintwo ?
from go-client.
I have exactly the same problem as vkorn.
Method "Register" has 2 modes : user+registration or registration-only. But impossible to use the 2nd one, the client try to create an user (which is nil
because we don't want to create an user but use an existing user id)
When I look here :
go-client/pkg/fusionauth/Domain.go
Line 2691 in 9163510
we can see this field shouldn't appear in the generated JSON body if not provided when we create the RegistrationObject (but apparently it does).
from go-client.
For now I dupplicate the Register
method and change the RegistrationRequest
by a custom one (without the user). It's a pretty similar workaround (dupplicate code :/)
from go-client.
@mooreds we have run into this issue as well. We are pursuing the workaround for now but would be really keen to see the root cause addressed.
Also keen to understand whether we will run into the issue raised in #1576 or if the workaround avoids that problem.
Should we lodge a support ticket re this issue?
from go-client.
@mooreds or @benkloester is this a simple change to how we are building the domain objects in go so that the User
reference in RegistrationRequest
is *User
?
go-client/pkg/fusionauth/Domain.go
Line 4434 in 028dacc
from go-client.
That go-client is generated code, produced by fusionauth-client-builder, so the fix would really need to be in the builder or it will get clobbered.
From the answer he gave above it seems like @mooreds had an idea of where one of the necessary changes would be, but there was a bit more to be figured out and there was also a need to test any such change.
from go-client.
Related Issues (20)
- ResendEmailVerification(): Always getting 401 HOT 4
- Tag release according to golang standards HOT 2
- Compilation error: pkg/fusionauth/Domain.go:2858:16: undefined: double HOT 2
- Login API cant get the refresh token without Application id in body request HOT 2
- GO client does not return headers from http response HOT 1
- CreateTenant with SourceTenantId does not behave as expected HOT 2
- ChangePasswordByIdentity API not working HOT 1
- ChangePasswordByIdentity API works without current password [URGENT]
- quesiton about retrieving logs HOT 2
- Missing Create Identity-provider API HOT 1
- Invalid Content-Type when making requests against server HOT 4
- Some retrieve functions in client package swallow the errors HOT 3
- WebhookIDs not available on tenant HOT 2
- compilation error: fusionauth/Client.go:4637:81: undefined: UserinfoResponse HOT 6
- CoseAlgorithmIdentifier is typed as a string but the API returns integers
- No 2XX status codes without a body may hide errors
- RegistrationRequest.User omitempty ineffective HOT 1
- register a user to an application
- User struct missing email verification related fields HOT 2
- Unable to consume go-client v0.0.0-20240624180314-2e401feb55f7 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-client.