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

Use POST for user sensitive calls #86

Merged
merged 1 commit into from
May 9, 2024
Merged

Use POST for user sensitive calls #86

merged 1 commit into from
May 9, 2024

Conversation

mlsorensen
Copy link
Contributor

@mlsorensen mlsorensen commented May 7, 2024

Add a set to contain the API names that should use POST. Not all defined API names here are actually generated by this client yet (namely the 2FA and registerUserData APIs), but would want to be POST when they're introduced.

Note this also fixes a typo in the listApis.json which actually resides upstream core cloudstack, in the OpenDaylight API descriptions.

It seems listApis.json was recently updated without calling generate, because without fixing the typo here it wants to introduce the typo into the generated code. So I am stuck with a choice between committing a change to listApis or committing a typo to the generated bindings.

@mlsorensen
Copy link
Contributor Author

Fixes #85

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good to me.
Need to verify if the new methods work as expected.

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

Comment on lines +70 to +72
"registerUserData": true,
"setupUserTwoFactorAuthentication": true,
"validateUserTwoFactorAuthenticationCode": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code for these 3 commands is not being generated since they are not defined in generate/layout.go.

Copy link
Contributor Author

@mlsorensen mlsorensen May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, but they're calls that I wanted to ensure use post when and if they do get added.

@vishesh92
Copy link
Member

code looks good to me. Need to verify if the new methods work as expected.

Verified createUser & updateUser methods.

@mlsorensen mlsorensen merged commit 2b21240 into main May 9, 2024
1 check passed
@mlsorensen mlsorensen deleted the post branch May 9, 2024 15:00
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.

3 participants