Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove omitempty from booleans on Oauth2Configuration #22

Closed
wants to merge 1 commit into from

Conversation

autom8ter
Copy link

Having omitempty on the booleans of the OAuth2Configuration object means that requireClientAuthentication & generateRefreshTokens can never be set to false in API requests. When either are set to false, they are omitted from the request body and FA defaults them to true.

@robotdan
Copy link
Member

This file is generated. If we incorporate this change, would the correct change be to remove omitempty for all bool types across the entire domain?

@autom8ter
Copy link
Author

Yes, that would be the right move. It's important to explicitly set false booleans on many domain objects.

@robotdan
Copy link
Member

Great, thanks @autom8ter - will be be backwards compatible as far as you know?

Ok, for reference here is the code I'll be modifying.

https://github.com/FusionAuth/fusionauth-client-builder/blob/c0489c9f57a6861d94368ce253d91b7d0279aaff/src/main/client/go.domain.ftl#L91

robotdan added a commit to FusionAuth/fusionauth-client-builder that referenced this pull request Jun 19, 2020
@autom8ter
Copy link
Author

yes, it will be backwards compatible 👍

@robotdan
Copy link
Member

@robotdan robotdan self-assigned this Jun 19, 2020
@autom8ter
Copy link
Author

@robotdan this looks good. Id assume "string" and "int" fields would need this too(0 & "" may be valid inputs for certain requests) but this is good for now.

@robotdan
Copy link
Member

Thanks @autom8ter - we lean on our community experts in each language domain for this type of input. It is appreciated.

If you run into this issue with other data types, please let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants