Type is wrong for `forceRandomPassword` in `Users.create()`
domharrington opened this issue · comments
Description
- Node.js version: v18.18.2
- Gitbeaker version: 39.25.0
- Gitbeaker release (cli, node, browser, core, requester-utils): node
- OS & version: macOS 13.5.2 (22G91)
The type for forceRandomPassword
in CreateUserOptions
is incorrect, it should be a boolean:
API Docs: https://docs.gitlab.com/ee/api/users.html#user-creation
force_random_password
Set user password to a random value - true or false (default)
Steps to reproduce
Try to pass a boolean to forceRandomPassword:
![image](https://private-user-images.githubusercontent.com/848223/288849253-3de9b6de-52f1-4f30-a549-e7bc5a273e44.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NTIzNzEsIm5iZiI6MTcxODg1MjA3MSwicGF0aCI6Ii84NDgyMjMvMjg4ODQ5MjUzLTNkZTliNmRlLTUyZjEtNGYzMC1hNTQ5LWU3YmM1YTI3M2U0NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyMFQwMjU0MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMzk5MTcwY2ZmZmEwMjcwYjk0YzhjZDFhODVlZWIyZjVhMmRkMTY1N2QxZWUxNzM1YzY2NzQ5NDJhOTFiMmFlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.b3sB0sJDixwaxCm2-sBgczWrbvM3Ce1TkaU2JJrcVCk)
Expected behaviour
Should work
Actual behaviour
Type error
Possible fixes
Update type to boolean
Checklist
- I have checked that this is not a duplicate issue.
- I have read the documentation.
Happy to put in a PR if you want me to, but hopefully should be a one line fix!
Its definitely a one line fix! Feel free to through up a PR, I can have it merged today.
Thanks for the fast reply! I also just noticed that I think PersonalAccessTokenSchema.token
should be required instead of optional?
Afaict the token
is always going to be returned from this API?
Do you want this in the same PR or a different one?
Same one is fine!